Hi, I'm interested in bindings to several libraries but I don't want to do it by hand. I definitely prefer to automate their generation.
Unfortunately, some type information is missing. The best example is probably with lists and other data structures: eina_module_list_get() returns an Eina_List but what is the type of the elements inside it? In this case, it's an Eina_Module list: quite understandable to humans but unusable for automated tasks. For some languages, lacking this kind of information prevents building an API with a native feel and is even dangerous sometimes. C++ would call them "std::vector<eina::module>" or so, Go would have "list of Eina_Module", OCaml would name them "Eina_Module list". The Glib people did it (almost) right and have annotations in their code. There are two interesting documentation pages about it: https://live.gnome.org/GObjectIntrospection/Annotations https://live.gnome.org/GObjectIntrospection/WritingBindingableAPIs I definitely don't agree with everything there but it's worth a quick read to see ideas and examples. This leaves a couple questions: - can doxygen be used to extract annotations; if not, I can write something reliable to do it - which format to use (glib uses S-expressions which are simple to parse) I'll also mention a few more benefits of more annotations and more bindings: - makes some bad APIs more obvious - finds irregular function names - better developer documentation (thinking about the exact return type of eina_module_list_get() late in the day after a very stressful day didn't prove very successful for me) - exercises more parts of the code - can bring some interesting concepts (and I already have a secret experiment planned :-) ) Any comment? Overall I find Glib's annotations to be pretty well-done so I'd be tempted to do it similarly. Also, without such bindings, I'd be forced to do more GTK+ and less EFL (plus I pay beers). ='( -- Adrien Nader ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel