5 ms·
Some have questioned the wisdom of that decision: https://what.thedailywtf.com/topic/15001/enlightened https://what.thedailywtf.com/topic/15001/enlightened
by tetromino_ 3y ago
Some have questioned the wisdom of that decision: https://what.thedailywtf.com/topic/15001/enlightened https://what.thedailywtf.com/topic/15001/enlightened
- badsectoracula 3y agoIIRC the author of that article really misunderstood what he was working with, for example he mentions that everything in EFL is an Evas_Object but that is only for the Evas library - which is a scene graph (another thing he seemed to misunderstand). In addition using a generic handle for an object is also something common in C APIs that want to hide the implementation details for objects, especially generic ones (one of the most common cases is HWND on Windows). I haven't used EFL myself to judge its quality (i considered it for a bit but from what i could tell it doesn't seem the main developer(s) considers backwards compatibility important - there is some API revamp which on one hand sounds nice but on the other hand it means anything that uses the existing API will stop working - though i might be wrong here) but from what i could tell the author didn't really knew the API he was working with.
- dig1 3y agoAlso, the author does not seem to understand how C callbacks work. Gtk uses the same stuff, hiding them under "signals". Qt had an awful hack to support C++-style callbacks through the MOC preprocessor, which, in the end, were "compiled" into C-style callbacks. AFAIK, after C++11 they moved from this. > If you can pass a const, you can pass a string literal for example, which will then be de-const’d, so you can modify it at will. Welcome to the land of undefined behavior by design! The author needed to understand what C is - a weakly typed language that doesn't get in your way. EFL (and Enlightenment) was created and led by Rasterman [1], the guy who knows his craft and doesn't waste his time with type-related theoretical nonsense. I find his code extremely readable and performant, and he has a lot of good resources to learn from. [1] https://en.wikipedia.org/wiki/Carsten_Haitzler https://en.wikipedia.org/wiki/Carsten_Haitzler
- dale_glass 3y ago> Qt had an awful hack to support C++-style callbacks through the MOC preprocessor, which, in the end, were "compiled" into C-style callbacks. AFAIK, after C++11 they moved from this. Nothing really awful about it. MOC is the MetaObject Compiler, and it's needed to support introspection. In standard C++ you can't just list the methods or properties any random thing has, for instance. Signals are also pretty complex. At the simplest, yes, they're more or less a C callback. But they can also be queued and sent between threads, and that of course needs special support that Qt does for you behind the scenes. What changed in newer releases is that signal syntax moved from using strings: connect(sender, SIGNAL(destroyed(QObject*)), this, SLOT(objectDestroyed())); // This is pretty much: connect(sender, "destroyed(QObject*)", this, "objectDestroyed()"); to references: connect(sender, &QObject::destroyed, this, &MyObject::objectDestroyed); Which means connections are checked at compile time instead of at runtime, and you can also connect signals to functors or lambdas.
- agumonkey 3y agoAlso enlightened (and thus rasterman) had a reputation of non trivial optimizations and low memory footprint which was critical for early smartphones.
- IshKebab 3y agoThey didn't display any misunderstanding of C callbacks. The two complaints I read were: 1. You pass a const pointer in and get a mutable pointer out. 2. The value of one of the parameters was inconsistent. Both are valid criticisms. The first point is objectively wrong API design. Let me repeat, it is objectively wrong. C may not have the strongest type system but that doesn't mean that the intended programming model is "completely ignore const correctness". > knows his craft Maybe. But there are plenty of programmers who achieve great things while being objectively awful programmers. The criticisms in this article (assuming they are true) are really unarguable.
- IshKebab 3y agoWow that's way worse than I would have expected. Especially those error messages. I imagine bosses could brush off "the API design is completely broken" because they don't have direct experience of it but how do you accept using a library with error messages like "You bitch!"? I'm genuinely curious how Tizen came to use EFL. Edit: I looked it up; apparently due to high performance and built in theming support (which tbf I do remember being true of E17 back in the day). They do also note the "unfamiliar developer experience" and lack of documentation and developers. Definitely an odd choice.
- abrouwers 3y agoI'm not sure about the origin, but for a while, several EFL developers worked directly for Samsung. It was great (as a previous user of Enlightenment) because development was super active.