Top Banner
The EFL API in Review Tom Hacohen Samsung Electronics Open Source Group [email protected] @TomHacohen EFL Dev Day NA 2015
167
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

The EFL API in Review

Tom HacohenSamsung Electronics Open Source Group

[email protected]

@TomHacohen

EFL Dev Day NA 2015

Page 2: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Introduction

Today’s Topics

I Eo recap

I Interfaces recap

I Major decisions for the future

Page 3: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Introduction

Today’s Topics

I Eo recap

I Interfaces recap

I Major decisions for the future

Page 4: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Introduction

Today’s Topics

I Eo recap

I Interfaces recap

I Major decisions for the future

Page 5: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Introduction

Today’s Topics

I Eo recap

I Interfaces recap

I Major decisions for the future

Page 6: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Main Goals

Unify Code

I Many different object systems → one

I Many different event/callback implementations → one

I Make objects compatible

Page 7: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Main Goals

Unify Code

I Many different object systems → one

I Many different event/callback implementations → one

I Make objects compatible

Page 8: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Main Goals

Unify Code

I Many different object systems → one

I Many different event/callback implementations → one

I Make objects compatible

Page 9: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Main Goals

Unify Code

I Many different object systems → one

I Many different event/callback implementations → one

I Make objects compatible

Page 10: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Main Goals

Reducing our API

We have:

evas_object_image_file_set(obj , "blah.png", "key");

edje_object_file_set(obj , "blah.edj", "group");

evas_object_del(obj);

ecore_timer_del(obj);

ecore_animator_del(obj);

Page 11: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Main Goals

Reducing our API

We have:

evas_object_image_file_set(obj , "blah.png", "key");

edje_object_file_set(obj , "blah.edj", "group");

evas_object_del(obj);

ecore_timer_del(obj);

ecore_animator_del(obj);

Page 12: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Main Goals

Bindings Generation

I Be able to automatically generate for most popular languages

I Correctly handle ref counting, buffer ownership and etc.

Page 13: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Main Goals

Bindings Generation

I Be able to automatically generate for most popular languages

I Correctly handle ref counting, buffer ownership and etc.

Page 14: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Main Goals

Bindings Generation

I Be able to automatically generate for most popular languages

I Correctly handle ref counting, buffer ownership and etc.

Page 15: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Main Goals

Not Hurt Performance

I Not easily measurable – many changes in EFL

Page 16: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Main Goals

Not Hurt Performance

I Not easily measurable – many changes in EFL

Page 17: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Object Systems

Other Languages

I C++ – our developers hate itI Objective C – quite ugly and not really common in OSS world

I We considered using just the runtime

Page 18: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Object Systems

Other Languages

I C++ – our developers hate it

I Objective C – quite ugly and not really common in OSS world

I We considered using just the runtime

Page 19: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Object Systems

Other Languages

I C++ – our developers hate itI Objective C – quite ugly and not really common in OSS world

I We considered using just the runtime

Page 20: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Object Systems

Other Languages

I C++ – our developers hate itI Objective C – quite ugly and not really common in OSS world

I We considered using just the runtime

Page 21: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Object Systems

GObject

Good:

I Fast

I Has a “C feel”

Bad:

I Doesn’t offer a stable ABI

I Funny, full of casting syntax

I “G tech” dependencies

I Didn’t exactly fit our needs

Page 22: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Object Systems

GObject

Good:

I Fast

I Has a “C feel”

Bad:

I Doesn’t offer a stable ABI

I Funny, full of casting syntax

I “G tech” dependencies

I Didn’t exactly fit our needs

Page 23: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Object Systems

GObject

Good:

I Fast

I Has a “C feel”

Bad:

I Doesn’t offer a stable ABI

I Funny, full of casting syntax

I “G tech” dependencies

I Didn’t exactly fit our needs

Page 24: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Object Systems

GObject

Good:

I Fast

I Has a “C feel”

Bad:

I Doesn’t offer a stable ABI

I Funny, full of casting syntax

I “G tech” dependencies

I Didn’t exactly fit our needs

Page 25: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Object Systems

GObject

Good:

I Fast

I Has a “C feel”

Bad:

I Doesn’t offer a stable ABI

I Funny, full of casting syntax

I “G tech” dependencies

I Didn’t exactly fit our needs

Page 26: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Object Systems

GObject

Good:

I Fast

I Has a “C feel”

Bad:

I Doesn’t offer a stable ABI

I Funny, full of casting syntax

I “G tech” dependencies

I Didn’t exactly fit our needs

Page 27: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Object Systems

GObject

Good:

I Fast

I Has a “C feel”

Bad:

I Doesn’t offer a stable ABI

I Funny, full of casting syntax

I “G tech” dependencies

I Didn’t exactly fit our needs

Page 28: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Object Systems

GObject

Good:

I Fast

I Has a “C feel”

Bad:

I Doesn’t offer a stable ABI

I Funny, full of casting syntax

I “G tech” dependencies

I Didn’t exactly fit our needs

Page 29: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo?

Basics

I It’s Enlightenment’s (fairly) new object system

I Supports classes, abstract classes, mixins and interfaces

I Completely written in C (no external preprocessor)

I API/ABI stable

I Portable

Page 30: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo?

Basics

I It’s Enlightenment’s (fairly) new object system

I Supports classes, abstract classes, mixins and interfaces

I Completely written in C (no external preprocessor)

I API/ABI stable

I Portable

Page 31: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo?

Basics

I It’s Enlightenment’s (fairly) new object system

I Supports classes, abstract classes, mixins and interfaces

I Completely written in C (no external preprocessor)

I API/ABI stable

I Portable

Page 32: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo?

Basics

I It’s Enlightenment’s (fairly) new object system

I Supports classes, abstract classes, mixins and interfaces

I Completely written in C (no external preprocessor)

I API/ABI stable

I Portable

Page 33: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo?

Basics

I It’s Enlightenment’s (fairly) new object system

I Supports classes, abstract classes, mixins and interfaces

I Completely written in C (no external preprocessor)

I API/ABI stable

I Portable

Page 34: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo?

Basics

I It’s Enlightenment’s (fairly) new object system

I Supports classes, abstract classes, mixins and interfaces

I Completely written in C (no external preprocessor)

I API/ABI stable

I Portable

Page 35: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo?

Using Eo

I eo_do(obj, efl_file_set("file.eet", "key"));I if (eo_do_ret(obj, tmp, elm_widget_enabled_get()))I eo_do(obj, visible = elm_widget_visibility_get(), ←↩

elm_widget_visibility_set(!visible));I eo_do(obj, elm_widget_visibility_set(!elm_widget_visibility_get()));

I static void size_multiply(double f)

{

int w, h;

evas_object_geometry_get(NULL , NULL , &w, &h);

evas_object_geometry_set(NULL , NULL , w * f, h * f);

}

eo_do(obj , size_multiply (3.5));

Page 36: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo?

Using Eo

I eo_do(obj, efl_file_set("file.eet", "key"));

I if (eo_do_ret(obj, tmp, elm_widget_enabled_get()))I eo_do(obj, visible = elm_widget_visibility_get(), ←↩

elm_widget_visibility_set(!visible));I eo_do(obj, elm_widget_visibility_set(!elm_widget_visibility_get()));

I static void size_multiply(double f)

{

int w, h;

evas_object_geometry_get(NULL , NULL , &w, &h);

evas_object_geometry_set(NULL , NULL , w * f, h * f);

}

eo_do(obj , size_multiply (3.5));

Page 37: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo?

Using Eo

I eo_do(obj, efl_file_set("file.eet", "key"));I if (eo_do_ret(obj, tmp, elm_widget_enabled_get()))

I eo_do(obj, visible = elm_widget_visibility_get(), ←↩elm_widget_visibility_set(!visible));

I eo_do(obj, elm_widget_visibility_set(!elm_widget_visibility_get()));

I static void size_multiply(double f)

{

int w, h;

evas_object_geometry_get(NULL , NULL , &w, &h);

evas_object_geometry_set(NULL , NULL , w * f, h * f);

}

eo_do(obj , size_multiply (3.5));

Page 38: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo?

Using Eo

I eo_do(obj, efl_file_set("file.eet", "key"));I if (eo_do_ret(obj, tmp, elm_widget_enabled_get()))I eo_do(obj, visible = elm_widget_visibility_get(), ←↩

elm_widget_visibility_set(!visible));

I eo_do(obj, elm_widget_visibility_set(!elm_widget_visibility_get()));

I static void size_multiply(double f)

{

int w, h;

evas_object_geometry_get(NULL , NULL , &w, &h);

evas_object_geometry_set(NULL , NULL , w * f, h * f);

}

eo_do(obj , size_multiply (3.5));

Page 39: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo?

Using Eo

I eo_do(obj, efl_file_set("file.eet", "key"));I if (eo_do_ret(obj, tmp, elm_widget_enabled_get()))I eo_do(obj, visible = elm_widget_visibility_get(), ←↩

elm_widget_visibility_set(!visible));I eo_do(obj, elm_widget_visibility_set(!elm_widget_visibility_get()));

I static void size_multiply(double f)

{

int w, h;

evas_object_geometry_get(NULL , NULL , &w, &h);

evas_object_geometry_set(NULL , NULL , w * f, h * f);

}

eo_do(obj , size_multiply (3.5));

Page 40: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo?

Using Eo

I eo_do(obj, efl_file_set("file.eet", "key"));I if (eo_do_ret(obj, tmp, elm_widget_enabled_get()))I eo_do(obj, visible = elm_widget_visibility_get(), ←↩

elm_widget_visibility_set(!visible));I eo_do(obj, elm_widget_visibility_set(!elm_widget_visibility_get()));

I static void size_multiply(double f)

{

int w, h;

evas_object_geometry_get(NULL , NULL , &w, &h);

evas_object_geometry_set(NULL , NULL , w * f, h * f);

}

eo_do(obj , size_multiply (3.5));

Page 41: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? | Internals

eo_do() – How It’s Done (simplified)

#define eo_do(eoid , ...) \

do { \

_eo_do_start(eoid); \

__VA_ARGS__; \

_eo_do_end (); \

} while (0)

Page 42: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? | Internals

eo_do() – How It’s Done (simplified)

#define eo_do(eoid , ...) \

do { \

_eo_do_start(eoid); \

__VA_ARGS__; \

_eo_do_end (); \

} while (0)

Page 43: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? | Internals

eo_do_ret() – How It’s Done (simplified)

#define eo_do_ret(eoid , ret_tmp , func) \

( \

_eo_do_start(eoid), \

ret_tmp = func , \

_eo_do_end (), \

ret_tmp \

)

Page 44: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? | Internals

eo_do_ret() – How It’s Done (simplified)

#define eo_do_ret(eoid , ret_tmp , func) \

( \

_eo_do_start(eoid), \

ret_tmp = func , \

_eo_do_end (), \

ret_tmp \

)

Page 45: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? | Internals

Defining New Functions (simplified)

EOAPI EO_FUNC_BODY(eo_parent_get, Eo *, NULL);

#define EO_FUNC_BODY(Name , Ret , DefRet) \

Ret Name(void) \

{ \

static Eo_Op op = EO_NOOP; \

if (op == EO_NOOP) \

op = _eo_api_op_id_get ((void*) Name); \

if (! _eo_call_resolve (#Name , op , &call)) \

return DefRet; \

_Eo_##Name##_func _func_ = \

(_Eo_##Name##_func) call.func; \

return _func_(call.obj , call.data); \

}

Page 46: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? | Internals

Defining New Functions (simplified)

EOAPI EO_FUNC_BODY(eo_parent_get, Eo *, NULL);

#define EO_FUNC_BODY(Name , Ret , DefRet) \

Ret Name(void) \

{ \

static Eo_Op op = EO_NOOP; \

if (op == EO_NOOP) \

op = _eo_api_op_id_get ((void*) Name); \

if (! _eo_call_resolve (#Name , op , &call)) \

return DefRet; \

_Eo_##Name##_func _func_ = \

(_Eo_##Name##_func) call.func; \

return _func_(call.obj , call.data); \

}

Page 47: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? | Internals

Defining New Functions (simplified)

EOAPI EO_FUNC_BODY(eo_parent_get, Eo *, NULL);

#define EO_FUNC_BODY(Name , Ret , DefRet) \

Ret Name(void) \

{ \

static Eo_Op op = EO_NOOP; \

if (op == EO_NOOP) \

op = _eo_api_op_id_get ((void*) Name); \

if (! _eo_call_resolve (#Name , op , &call)) \

return DefRet; \

_Eo_##Name##_func _func_ = \

(_Eo_##Name##_func) call.func; \

return _func_(call.obj , call.data); \

}

Page 48: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? | Internals

Defining New Classes (simplified)

Populating a struct with some metadata

static Eo_Op_Description _edje_object_op_desc [] = {

EO_OP_FUNC(edje_obj_update_hints_set , ←↩_edje_object_update_hints_set),

EO_OP_FUNC_OVERRIDE(eo_constructor , ←↩_edje_object_eo_base_constructor),

EO_OP_CLASS_FUNC(eo_event_global_thaw , ←↩_eo_base_event_global_thaw),

EO_OP_CLASS_OVERRIDE_FUNC(eo_event_global_thaw , ←↩_edje_object_eo_base_event_global_thaw)

};

Page 49: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? | Internals

Defining New Classes (simplified)

Populating a struct with some metadata

static Eo_Op_Description _edje_object_op_desc [] = {

EO_OP_FUNC(edje_obj_update_hints_set , ←↩_edje_object_update_hints_set),

EO_OP_FUNC_OVERRIDE(eo_constructor , ←↩_edje_object_eo_base_constructor),

EO_OP_CLASS_FUNC(eo_event_global_thaw , ←↩_eo_base_event_global_thaw),

EO_OP_CLASS_OVERRIDE_FUNC(eo_event_global_thaw , ←↩_edje_object_eo_base_event_global_thaw)

};

Page 50: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? | Internals

Event Identifiers

EOAPI const Eo_Event_Description ←↩_EO_BASE_EVENT_CALLBACK_ADD = ←↩EO_EVENT_DESCRIPTION("callback ,add");

Page 51: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? | Internals

Event Identifiers

EOAPI const Eo_Event_Description ←↩_EO_BASE_EVENT_CALLBACK_ADD = ←↩EO_EVENT_DESCRIPTION("callback ,add");

Page 52: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? |

Unique Features

I Pointer indirection (at least in C)

I Multiple calls in one context

I How we do constructors (setting properties, no constructors)

I Named ref-counting

I Composite objects

I Default return values

Page 53: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? |

Unique Features

I Pointer indirection (at least in C)

I Multiple calls in one context

I How we do constructors (setting properties, no constructors)

I Named ref-counting

I Composite objects

I Default return values

Page 54: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? |

Unique Features

I Pointer indirection (at least in C)

I Multiple calls in one context

I How we do constructors (setting properties, no constructors)

I Named ref-counting

I Composite objects

I Default return values

Page 55: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? |

Unique Features

I Pointer indirection (at least in C)

I Multiple calls in one context

I How we do constructors (setting properties, no constructors)

I Named ref-counting

I Composite objects

I Default return values

Page 56: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? |

Unique Features

I Pointer indirection (at least in C)

I Multiple calls in one context

I How we do constructors (setting properties, no constructors)

I Named ref-counting

I Composite objects

I Default return values

Page 57: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? |

Unique Features

I Pointer indirection (at least in C)

I Multiple calls in one context

I How we do constructors (setting properties, no constructors)

I Named ref-counting

I Composite objects

I Default return values

Page 58: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

What is Eo? |

Unique Features

I Pointer indirection (at least in C)

I Multiple calls in one context

I How we do constructors (setting properties, no constructors)

I Named ref-counting

I Composite objects

I Default return values

Page 59: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Reception |

Wash, Rinse, Repeat

I Eo1

I Eo2

I Eolian

I Eolian (improved)

Page 60: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Reception |

Wash, Rinse, Repeat

I Eo1

I Eo2

I Eolian

I Eolian (improved)

Page 61: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Reception |

Wash, Rinse, Repeat

I Eo1

I Eo2

I Eolian

I Eolian (improved)

Page 62: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Reception |

Wash, Rinse, Repeat

I Eo1

I Eo2

I Eolian

I Eolian (improved)

Page 63: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Reception |

Wash, Rinse, Repeat

I Eo1

I Eo2

I Eolian

I Eolian (improved)

Page 64: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Impact |

Stability

I Pointer indirection saved us in many cases

I We caught a lot of errors that were not noticed before

I Single point of access for type checking makes it impossible to forget

Page 65: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Impact |

Stability

I Pointer indirection saved us in many cases

I We caught a lot of errors that were not noticed before

I Single point of access for type checking makes it impossible to forget

Page 66: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Impact |

Stability

I Pointer indirection saved us in many cases

I We caught a lot of errors that were not noticed before

I Single point of access for type checking makes it impossible to forget

Page 67: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Impact |

Stability

I Pointer indirection saved us in many cases

I We caught a lot of errors that were not noticed before

I Single point of access for type checking makes it impossible to forget

Page 68: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Impact |

Reduced API

Before:

evas_object_image_file_set(obj , "blah.png", "key");

edje_object_file_set(obj , "blah.edj", "group");

evas_object_del(obj);

ecore_timer_del(obj);

ecore_animator_del(obj);

Now:

eo_do(obj , efl_file_set("blah.file", "key"));

eo_del(obj);

Page 69: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Impact |

Reduced API

Before:

evas_object_image_file_set(obj , "blah.png", "key");

edje_object_file_set(obj , "blah.edj", "group");

evas_object_del(obj);

ecore_timer_del(obj);

ecore_animator_del(obj);

Now:

eo_do(obj , efl_file_set("blah.file", "key"));

eo_del(obj);

Page 70: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Impact |

Reduced API

Before:

evas_object_image_file_set(obj , "blah.png", "key");

edje_object_file_set(obj , "blah.edj", "group");

evas_object_del(obj);

ecore_timer_del(obj);

ecore_animator_del(obj);

Now:

eo_do(obj , efl_file_set("blah.file", "key"));

eo_del(obj);

Page 71: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

But writing objects in C is tedious!

I The answer: Eolian

I Eolian parses Eo API declarations

I Eolian allows for automated binding generators

I Eolian is meant to be familar for everyone

Page 72: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

But writing objects in C is tedious!

I The answer: Eolian

I Eolian parses Eo API declarations

I Eolian allows for automated binding generators

I Eolian is meant to be familar for everyone

Page 73: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

But writing objects in C is tedious!

I The answer: Eolian

I Eolian parses Eo API declarations

I Eolian allows for automated binding generators

I Eolian is meant to be familar for everyone

Page 74: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

But writing objects in C is tedious!

I The answer: Eolian

I Eolian parses Eo API declarations

I Eolian allows for automated binding generators

I Eolian is meant to be familar for everyone

Page 75: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

But writing objects in C is tedious!

I The answer: Eolian

I Eolian parses Eo API declarations

I Eolian allows for automated binding generators

I Eolian is meant to be familar for everyone

Page 76: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

A new format?

I Language independent → easy bindings

I Familiar syntax → easy to pick up

I Easy to read and write

I Declarative and descriptive

Page 77: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

A new format?

I Language independent → easy bindings

I Familiar syntax → easy to pick up

I Easy to read and write

I Declarative and descriptive

Page 78: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

A new format?

I Language independent → easy bindings

I Familiar syntax → easy to pick up

I Easy to read and write

I Declarative and descriptive

Page 79: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

A new format?

I Language independent → easy bindings

I Familiar syntax → easy to pick up

I Easy to read and write

I Declarative and descriptive

Page 80: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

A new format?

I Language independent → easy bindings

I Familiar syntax → easy to pick up

I Easy to read and write

I Declarative and descriptive

Page 81: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

class Namespace.Class (inherits) {

methods { ... }

properties { ... }

events { ... }

implements { ... }

constructors { ... }

}

type Type_Name: Type_Def;

struct Struct_Name { ... }

enum Enum_Name { ... }

Page 82: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

methods {

method_name @class @protected {

params {

@in int x;

@out const(char) *y;

}

return: own(char*);

}

}

Page 83: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

properties {

property_name {

keys {

list <int > *x;

}

values {

int v;

}

get {}

set {}

}

}

Page 84: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

Generators!

I Initial generator: C

I Further generators in core EFL: C++ and Lua

I Third party generators (under development): JavaScript, Python, Rust and OCaml

Page 85: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

Generators!

I Initial generator: C

I Further generators in core EFL: C++ and Lua

I Third party generators (under development): JavaScript, Python, Rust and OCaml

Page 86: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

Generators!

I Initial generator: C

I Further generators in core EFL: C++ and Lua

I Third party generators (under development): JavaScript, Python, Rust and OCaml

Page 87: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

Generators!

I Initial generator: C

I Further generators in core EFL: C++ and Lua

I Third party generators (under development): JavaScript, Python, Rust and OCaml

Page 88: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

The Eolian library

I C API: simple and easy to use

I Minimum of non-standard data types → easy to bind

I Not only for generators (IDEs. . . )

I Simple database

Page 89: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

The Eolian library

I C API: simple and easy to use

I Minimum of non-standard data types → easy to bind

I Not only for generators (IDEs. . . )

I Simple database

Page 90: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

The Eolian library

I C API: simple and easy to use

I Minimum of non-standard data types → easy to bind

I Not only for generators (IDEs. . . )

I Simple database

Page 91: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

The Eolian library

I C API: simple and easy to use

I Minimum of non-standard data types → easy to bind

I Not only for generators (IDEs. . . )

I Simple database

Page 92: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

The Eolian library

I C API: simple and easy to use

I Minimum of non-standard data types → easy to bind

I Not only for generators (IDEs. . . )

I Simple database

Page 93: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

However. . .

I Some things are still missing

I Documentation?

I Value ownership

I And possibly others

And yet. . .

I Very useful

I Generic

I I’d like to get it adopted by others (non EFL)

Page 94: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

However. . .

I Some things are still missing

I Documentation?

I Value ownership

I And possibly others

And yet. . .

I Very useful

I Generic

I I’d like to get it adopted by others (non EFL)

Page 95: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

However. . .

I Some things are still missing

I Documentation?

I Value ownership

I And possibly others

And yet. . .

I Very useful

I Generic

I I’d like to get it adopted by others (non EFL)

Page 96: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

However. . .

I Some things are still missing

I Documentation?

I Value ownership

I And possibly others

And yet. . .

I Very useful

I Generic

I I’d like to get it adopted by others (non EFL)

Page 97: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

However. . .

I Some things are still missing

I Documentation?

I Value ownership

I And possibly others

And yet. . .

I Very useful

I Generic

I I’d like to get it adopted by others (non EFL)

Page 98: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

However. . .

I Some things are still missing

I Documentation?

I Value ownership

I And possibly others

And yet. . .

I Very useful

I Generic

I I’d like to get it adopted by others (non EFL)

Page 99: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

However. . .

I Some things are still missing

I Documentation?

I Value ownership

I And possibly others

And yet. . .

I Very useful

I Generic

I I’d like to get it adopted by others (non EFL)

Page 100: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

However. . .

I Some things are still missing

I Documentation?

I Value ownership

I And possibly others

And yet. . .

I Very useful

I Generic

I I’d like to get it adopted by others (non EFL)

Page 101: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

However. . .

I Some things are still missing

I Documentation?

I Value ownership

I And possibly others

And yet. . .

I Very useful

I Generic

I I’d like to get it adopted by others (non EFL)

Page 102: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Eolian |

However. . .

I Some things are still missing

I Documentation?

I Value ownership

I And possibly others

And yet. . .

I Very useful

I Generic

I I’d like to get it adopted by others (non EFL)

Page 103: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Clouseau

I Is there anyone who doesn’t know this one by now?I Application state inspector for the EFLI Was not created following Eo (but greatly improved)I Will get even better with Eolian

Page 104: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Clouseau

I Is there anyone who doesn’t know this one by now?

I Application state inspector for the EFLI Was not created following Eo (but greatly improved)I Will get even better with Eolian

Page 105: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Clouseau

I Is there anyone who doesn’t know this one by now?I Application state inspector for the EFL

I Was not created following Eo (but greatly improved)I Will get even better with Eolian

Page 106: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Clouseau

I Is there anyone who doesn’t know this one by now?I Application state inspector for the EFLI Was not created following Eo (but greatly improved)

I Will get even better with Eolian

Page 107: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Clouseau

I Is there anyone who doesn’t know this one by now?I Application state inspector for the EFLI Was not created following Eo (but greatly improved)I Will get even better with Eolian

Page 108: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Erigo

I EFL GUI builderI Reads properties from Eolian

I Supports whatever version is installed on the system automaticallyI Supports widgets that it has no notion of

I Has it’s own format that is processed by language specific code generators

Page 109: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Erigo

I EFL GUI builder

I Reads properties from Eolian

I Supports whatever version is installed on the system automaticallyI Supports widgets that it has no notion of

I Has it’s own format that is processed by language specific code generators

Page 110: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Erigo

I EFL GUI builderI Reads properties from Eolian

I Supports whatever version is installed on the system automaticallyI Supports widgets that it has no notion of

I Has it’s own format that is processed by language specific code generators

Page 111: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Erigo

I EFL GUI builderI Reads properties from Eolian

I Supports whatever version is installed on the system automatically

I Supports widgets that it has no notion ofI Has it’s own format that is processed by language specific code generators

Page 112: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Erigo

I EFL GUI builderI Reads properties from Eolian

I Supports whatever version is installed on the system automaticallyI Supports widgets that it has no notion of

I Has it’s own format that is processed by language specific code generators

Page 113: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Erigo

I EFL GUI builderI Reads properties from Eolian

I Supports whatever version is installed on the system automaticallyI Supports widgets that it has no notion of

I Has it’s own format that is processed by language specific code generators

Page 114: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Espion

I Goal: easily import GUIs to Erigo

I Intercepts eo_add() and eo_do()

I Uses Eolian to correctly process the calls

Page 115: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Espion

I Goal: easily import GUIs to Erigo

I Intercepts eo_add() and eo_do()

I Uses Eolian to correctly process the calls

Page 116: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Espion

I Goal: easily import GUIs to Erigo

I Intercepts eo_add() and eo_do()

I Uses Eolian to correctly process the calls

Page 117: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Other Projects |

Espion

I Goal: easily import GUIs to Erigo

I Intercepts eo_add() and eo_do()

I Uses Eolian to correctly process the calls

Page 118: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces |

What is it about (again)?

I Fixing up the EFL API and inheritance

I Utilising the new Eo features

I Annotating the EFL API for generated bindings

I Creating new classes that are important for the life cycle

I “Insanely important” — Carsten Haitzler (A few hours ago)

I Everything that’s even remotely related to Eo and EFL API and is dumped upon thistask arbitrarily.

Page 119: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces |

What is it about (again)?

I Fixing up the EFL API and inheritance

I Utilising the new Eo features

I Annotating the EFL API for generated bindings

I Creating new classes that are important for the life cycle

I “Insanely important” — Carsten Haitzler (A few hours ago)

I Everything that’s even remotely related to Eo and EFL API and is dumped upon thistask arbitrarily.

Page 120: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces |

What is it about (again)?

I Fixing up the EFL API and inheritance

I Utilising the new Eo features

I Annotating the EFL API for generated bindings

I Creating new classes that are important for the life cycle

I “Insanely important” — Carsten Haitzler (A few hours ago)

I Everything that’s even remotely related to Eo and EFL API and is dumped upon thistask arbitrarily.

Page 121: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces |

What is it about (again)?

I Fixing up the EFL API and inheritance

I Utilising the new Eo features

I Annotating the EFL API for generated bindings

I Creating new classes that are important for the life cycle

I “Insanely important” — Carsten Haitzler (A few hours ago)

I Everything that’s even remotely related to Eo and EFL API and is dumped upon thistask arbitrarily.

Page 122: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces |

What is it about (again)?

I Fixing up the EFL API and inheritance

I Utilising the new Eo features

I Annotating the EFL API for generated bindings

I Creating new classes that are important for the life cycle

I “Insanely important” — Carsten Haitzler (A few hours ago)

I Everything that’s even remotely related to Eo and EFL API and is dumped upon thistask arbitrarily.

Page 123: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces |

What is it about (again)?

I Fixing up the EFL API and inheritance

I Utilising the new Eo features

I Annotating the EFL API for generated bindings

I Creating new classes that are important for the life cycle

I “Insanely important” — Carsten Haitzler (A few hours ago)

I Everything that’s even remotely related to Eo and EFL API and is dumped upon thistask arbitrarily.

Page 124: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces |

What is it about (again)?

I Fixing up the EFL API and inheritance

I Utilising the new Eo features

I Annotating the EFL API for generated bindings

I Creating new classes that are important for the life cycle

I “Insanely important” — Carsten Haitzler (A few hours ago)

I Everything that’s even remotely related to Eo and EFL API and is dumped upon thistask arbitrarily.

Page 125: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

Fixing API and Inheritance

I Making all of the Ecore * Eo objects

I Removing duplicated APIs

elm_layout_part_text_set ()

edje_object_part_text_set ()

elm_object_text_set ()

I Make Elm.Layout implement Edje.Object

Page 126: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

Fixing API and Inheritance

I Making all of the Ecore * Eo objects

I Removing duplicated APIs

elm_layout_part_text_set ()

edje_object_part_text_set ()

elm_object_text_set ()

I Make Elm.Layout implement Edje.Object

Page 127: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

Fixing API and Inheritance

I Making all of the Ecore * Eo objects

I Removing duplicated APIs

elm_layout_part_text_set ()

edje_object_part_text_set ()

elm_object_text_set ()

I Make Elm.Layout implement Edje.Object

Page 128: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

Fixing API and Inheritance

I Making all of the Ecore * Eo objects

I Removing duplicated APIs

elm_layout_part_text_set ()

edje_object_part_text_set ()

elm_object_text_set ()

I Make Elm.Layout implement Edje.Object

Page 129: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

Using Eo Features

I Moving Ecore.Animator to be a signal on the window

I Moving Ecore.Job to be a signal on the mainloop

Page 130: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

Using Eo Features

I Moving Ecore.Animator to be a signal on the window

I Moving Ecore.Job to be a signal on the mainloop

Page 131: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

Using Eo Features

I Moving Ecore.Animator to be a signal on the window

I Moving Ecore.Job to be a signal on the mainloop

Page 132: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

Annotating for Bindings

I Add @own to relevant parameters

I Add enums/struct definitions in .eo files (when public)

I Use correct class names instead of Eo *

Page 133: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

Annotating for Bindings

I Add @own to relevant parameters

I Add enums/struct definitions in .eo files (when public)

I Use correct class names instead of Eo *

Page 134: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

Annotating for Bindings

I Add @own to relevant parameters

I Add enums/struct definitions in .eo files (when public)

I Use correct class names instead of Eo *

Page 135: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

Annotating for Bindings

I Add @own to relevant parameters

I Add enums/struct definitions in .eo files (when public)

I Use correct class names instead of Eo *

Page 136: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

New Classes

I Mainloop object

I Application object

Page 137: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

New Classes

I Mainloop object

I Application object

Page 138: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

EFL Interfaces | Examples

New Classes

I Mainloop object

I Application object

Page 139: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Questions | Examples

Questions so far?

Page 140: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Nullability

I Change and split @notnull to @nullable and @optional

I Very useful for languages that support this notion (e.g. Rust and C++)

I Leads to safer code and more information about types

I Side effect: stop using EINA_ARG_NONNULL

Page 141: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Nullability

I Change and split @notnull to @nullable and @optional

I Very useful for languages that support this notion (e.g. Rust and C++)

I Leads to safer code and more information about types

I Side effect: stop using EINA_ARG_NONNULL

Page 142: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Nullability

I Change and split @notnull to @nullable and @optional

I Very useful for languages that support this notion (e.g. Rust and C++)

I Leads to safer code and more information about types

I Side effect: stop using EINA_ARG_NONNULL

Page 143: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Nullability

I Change and split @notnull to @nullable and @optional

I Very useful for languages that support this notion (e.g. Rust and C++)

I Leads to safer code and more information about types

I Side effect: stop using EINA_ARG_NONNULL

Page 144: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Nullability

I Change and split @notnull to @nullable and @optional

I Very useful for languages that support this notion (e.g. Rust and C++)

I Leads to safer code and more information about types

I Side effect: stop using EINA_ARG_NONNULL

Page 145: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Thread Safety

I Eo infra is thread safe, objects aren’t

I Is there a useful case which requires we change that?

Page 146: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Thread Safety

I Eo infra is thread safe, objects aren’t

I Is there a useful case which requires we change that?

Page 147: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Thread Safety

I Eo infra is thread safe, objects aren’t

I Is there a useful case which requires we change that?

Page 148: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Shared Interfaces

I Share most of the EFL’s functions

I Change most functions to the EFL interfaces

I Forces API to be consistent

I Limits the flexibility of API (because everything is shared)

I Can cause clashes (parent class uses a function for one thing, child for another)

Page 149: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Shared Interfaces

I Share most of the EFL’s functions

I Change most functions to the EFL interfaces

I Forces API to be consistent

I Limits the flexibility of API (because everything is shared)

I Can cause clashes (parent class uses a function for one thing, child for another)

Page 150: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Shared Interfaces

I Share most of the EFL’s functions

I Change most functions to the EFL interfaces

I Forces API to be consistent

I Limits the flexibility of API (because everything is shared)

I Can cause clashes (parent class uses a function for one thing, child for another)

Page 151: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Shared Interfaces

I Share most of the EFL’s functions

I Change most functions to the EFL interfaces

I Forces API to be consistent

I Limits the flexibility of API (because everything is shared)

I Can cause clashes (parent class uses a function for one thing, child for another)

Page 152: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Shared Interfaces

I Share most of the EFL’s functions

I Change most functions to the EFL interfaces

I Forces API to be consistent

I Limits the flexibility of API (because everything is shared)

I Can cause clashes (parent class uses a function for one thing, child for another)

Page 153: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Shared Interfaces

I Share most of the EFL’s functions

I Change most functions to the EFL interfaces

I Forces API to be consistent

I Limits the flexibility of API (because everything is shared)

I Can cause clashes (parent class uses a function for one thing, child for another)

Page 154: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Short Names

I efl_file_set(), efl_color_set() . . .

I C API matches OOP languages’ API (C++, JS, Lua)

I Maintain the long names (full namespacing)?

I Developers seem to prefer short names (though come from OOP background)

I Improves API consistency (same name does the same)

I Have a generation pass across all eo files in efl (second stage?)

I Detect conflicts

Page 155: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Short Names

I efl_file_set(), efl_color_set() . . .

I C API matches OOP languages’ API (C++, JS, Lua)

I Maintain the long names (full namespacing)?

I Developers seem to prefer short names (though come from OOP background)

I Improves API consistency (same name does the same)

I Have a generation pass across all eo files in efl (second stage?)

I Detect conflicts

Page 156: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Short Names

I efl_file_set(), efl_color_set() . . .

I C API matches OOP languages’ API (C++, JS, Lua)

I Maintain the long names (full namespacing)?

I Developers seem to prefer short names (though come from OOP background)

I Improves API consistency (same name does the same)

I Have a generation pass across all eo files in efl (second stage?)

I Detect conflicts

Page 157: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Short Names

I efl_file_set(), efl_color_set() . . .

I C API matches OOP languages’ API (C++, JS, Lua)

I Maintain the long names (full namespacing)?

I Developers seem to prefer short names (though come from OOP background)

I Improves API consistency (same name does the same)

I Have a generation pass across all eo files in efl (second stage?)

I Detect conflicts

Page 158: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Short Names

I efl_file_set(), efl_color_set() . . .

I C API matches OOP languages’ API (C++, JS, Lua)

I Maintain the long names (full namespacing)?

I Developers seem to prefer short names (though come from OOP background)

I Improves API consistency (same name does the same)

I Have a generation pass across all eo files in efl (second stage?)

I Detect conflicts

Page 159: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Short Names

I efl_file_set(), efl_color_set() . . .

I C API matches OOP languages’ API (C++, JS, Lua)

I Maintain the long names (full namespacing)?

I Developers seem to prefer short names (though come from OOP background)

I Improves API consistency (same name does the same)

I Have a generation pass across all eo files in efl (second stage?)

I Detect conflicts

Page 160: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Short Names

I efl_file_set(), efl_color_set() . . .

I C API matches OOP languages’ API (C++, JS, Lua)

I Maintain the long names (full namespacing)?

I Developers seem to prefer short names (though come from OOP background)

I Improves API consistency (same name does the same)

I Have a generation pass across all eo files in efl (second stage?)

I Detect conflicts

Page 161: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Short Names

I efl_file_set(), efl_color_set() . . .

I C API matches OOP languages’ API (C++, JS, Lua)

I Maintain the long names (full namespacing)?

I Developers seem to prefer short names (though come from OOP background)

I Improves API consistency (same name does the same)

I Have a generation pass across all eo files in efl (second stage?)

I Detect conflicts

Page 162: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Small vs. Sparse Classes

I Small classes that have to be fully implemented

I Big classes with many optional properties

I Which do we want?

Page 163: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Small vs. Sparse Classes

I Small classes that have to be fully implemented

I Big classes with many optional properties

I Which do we want?

Page 164: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Small vs. Sparse Classes

I Small classes that have to be fully implemented

I Big classes with many optional properties

I Which do we want?

Page 165: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Discussions | Examples

Small vs. Sparse Classes

I Small classes that have to be fully implemented

I Big classes with many optional properties

I Which do we want?

Page 166: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Questions and Concerns | Examples

Questions or comments?

Page 167: [E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)

Resources Attributions | Examples

I Nothing