Re: [Vala] Vala bindings for epiphany?



On Sat, Oct 3, 2009 at 10:24 PM, Magnus Therning <magnus therning org> wrote:
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.

So what else can be a key in Python dictionaries exactly? The
documentation mentions a tuple of immutable objects, which I guess can
have its uses, but saying that javascript does not have dictionaries
(or only "dictionary-like" objects) because of this seems a bit over
the top to be honest.


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.

If you feel this is important you can always open a bug and suggest an
implementation to the Seed guys. This is the only way to improve
things.


 - 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.

I believe they are already changing some things to be more idiomatic,
like property definition or subclassing. In any case, as before, the
only way to improve things is to contribute.

Basically I'd say that all our problems at the moment come from the
fact that Seed is still a pretty new project in need of a lot of work
to mature, and that JavaScript is a perfectly adequate language to
write extensions or even large parts of the core of a browser (like
Firefox).


/M

--
Magnus Therning                        (OpenPGP: 0xAB4DFBA4)
magnus@therning.org          Jabber: magnus@therning.org
http://therning.org/magnus         identi.ca|twitter: magthe




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]