r/linux • u/rastermon • Aug 16 '14
Yet another C object model
https://phab.enlightenment.org/phame/live/1//post/yet_another_c_object_model_but_better/
53
Upvotes
r/linux • u/rastermon • Aug 16 '14
View all comments
Show parent comment
1
u/rastermon Aug 17 '14
the EO files are not required (except for bindings generation), but they save a hell of a lot of work. they are actually not language agnostic. they are specifically intended for generating the C code boilerplate, but ALSO for acting as information for bindings generation. so far C++ is already done and working. nicely too in fact. q66 is actually a lua fan and he is doing the work on the lua binding generation. we have other guys who love python working on eo and they have worked on and used the existing hand-done python bindings in enough code... this isn't being done in the dark. that's why there are properties. so in lua, for example you get obj.size = 10. (in c/c++ it's obj.efl_size_set(10);). there is only so much you can do to manually maintain bindings. it's an insane amount of work than never ends. the only sane way is to automate, and that may involve them looking a little "odd" at times in certain langauges - but that's a price you pay for cutting down the workload. cutting that down then allows you to support MORE languages.
oh... and... unlike gobject, our object access and method calling is safe at the C level - not the binding level. as per article - call the wrong method on an object that doesn't support that class ... noop and safe return. access already deleted object or just some garbage pointer - safe detect and noop, then safe return. that's already at the C level. that's one of the reasons we did our own, and didn't use gobject.