Let's Push Things Forward

Maximizing social utility for fun and (modest) profit

  • 1

Re: Heh, intersting choice.

Sure, JS is as OO as a average Italian city is a good example for the local building code. :)

Re: Heh, intersting choice.

I would reserve such a classification for C++, a language which has only the syntactic sugar but none of the fundamental concepts of OO and as you try to do more the more the whole thing breaks down until it is nought but a pretty facade. (For example change private members of implementation, recompile all client code depending only on the public interface, or cast to void* and muck around in memory directly.)

JavaScript at least offers, that I can see:

- Sandboxing. Something GNOME has been quietly edging towards.
- Limited surface area (Python as in "the programming experience including libs that people consider to be Python" is huge.)
- Mature VMs with a lot of goodies yielding perfectly adequate performance (to the point people get something not too terrible when they start interpreting C++ binaries in JS in the browser, or hardware emulation in JS in the browser).
- A much more flexible programming model that allows you to do really neat things which is more reminiscent of pure functional languages than anything else.

Of course JavaScript has its warts. Inclusion of the frankly redundant Java/C# style class based inheritance would be one of those, as it is utterly useless addition when you already have the more flexible prototype system.

And yes the portability between interpreters thing is inherently a red herring because a GNOME app is by definition going to be using GNOME libs + bindings which by definition is not going to be portable between JS environments. Still, at least with JS you *can* write code to treat libs/bindings as pluggable backends and paper over portability issues as opposed to a hard dependency without too much work -- that's what people have been doing in JS for years (think browsers).

  • 1

Log in