2009/10/3 Magnus Therning <[email protected]>: > On Sat, Oct 03, 2009 at 01:50:02PM +0300, Xan Lopez wrote: >> On Sat, Oct 3, 2009 at 1:30 PM, Magnus Therning <[email protected]> wrote: >> > On Fri, Oct 02, 2009 at 06:00:07PM +0200, Wouter Bolsterlee wrote: >> >> Op vrijdag 25-09-2009 om 22:11 uur [tijdzone +0100], schreef Magnus >> >> Therning: >> >> > Does anyone out there have a .vapi for epiphany's extension API? >> >> > >> >> > I'm particularly interested in the bookmark manipulation API. >> >> >> >> Afaik the idea is to have at least Seed extensions for Epiphany. Python >> >> support has been dropped, and it won't come back. I'm not sure about >> >> Vala, even though there were plans for it: >> >> >> >> http://uwstopia.nl/blog/2008/07/vala-bindings-for-epiphany-extensions >> >> >> >> But then, I think Seed extensions are designed fill exactly the same >> >> gap, so I'm not sure what the added value of Vala extensions is. >> > >> > Epiphany has always supported extensions written in C. Basically Vala >> > would >> > offer a way of writing C extensions in a language that arguably is much >> > nicer >> > to work with :-) >> > >> > My experience with trying to translate a Python extension to Seed was that >> > it >> > wasn't ready for proper use yet: >> > >> > - Javascript doesn't include many of the handy types that is in Python, >> > especially dictionaries (maps) and sets. Vala has Gee. >> >> Objects in JavaScript are dictionaries (I mean, even the syntax is the >> same...), and I'm sure there's plenty of implementations of data structures >> like Python sets around. > > No, they are "dictionary-like", not proper dictionaries. For instance keys > can only be strings or numbers. > > I'm sure there are implementations of sets around for JavaScript. But that's > just the point, Seed *doesn't come with one*, instead I have to look around > for an implementation to use. Then I have to track any upstream changes. > It's just not the kind of situation I expect from an extension language. I'm > sure this is going to change at some point, after all Seed is used in other > parts in Gnome too. > >> > - The GNOME libraries are largely written in C, and even though >> > introspection >> > makes Seed bindings trivial the API's are distinctly non-object >> > orientated. >> > Vala's .vapi files manage to offer a much improved API. >> >> How are Seed bindings not object orientated? Not to say that you can't >> improve things by doing manual fixing of the automated bindings, as usual, >> but I'm not sure what you mean here. > > Well, first of all, JavaScript's variant of object orientation has a > distinctive functional feel to me, but beyond that you are right, my comment > was overly harsh. Seed bindings are as object-orientated as GTK+/GNOME is, > which means it's somewhat limited by its C roots, but offers a good base to > build more idiomatic bindings for different object systems. I haven't found > any idiomatic bindings for JavaScript/Seed yet though.
Sorry for being a pedant; but JavaScript is not some random "variant" of object orientation. It is a prototype based language[1]. Try to ignore that and you will run into problems when writing larger bodies of code. -- Cheers, Mikkel [1]: http://en.wikipedia.org/wiki/Prototype-based_programming _______________________________________________ epiphany-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/epiphany-list
