User: Password:
|
|
Subscribe / Log in / New account

why should they pick a javascript engine?

why should they pick a javascript engine?

Posted May 21, 2009 12:39 UTC (Thu) by dlang (subscriber, #313)
In reply to: why should they pick a javascript engine? by jdub
Parent article: GNOME debates Javascript bindings

they should be able to use either engine (or the google V8 javascript engine), just like you can use different C compilers to compile good, portable C applications.


(Log in to post comments)

why should they pick a javascript engine?

Posted May 21, 2009 14:54 UTC (Thu) by nybble41 (subscriber, #55106) [Link]

The JavaScript code itself should be portable between the two engines, or any other they care to use. The problem is on the other end, in the interface between the JS engine and the non-JS Gnome APIs. If they don't settle on a particular implementation then they'll be forced to duplicate at least a portion of the native interface for each supported engine.

why should they pick a javascript engine?

Posted May 21, 2009 15:28 UTC (Thu) by jdub (subscriber, #27) [Link]

The article -- in fact, almost the entire point of the article -- describes why the situation is not that simple... These engines were designed to be used within the context of a web browser (embedded, single-purpose), so as Javascript becomes more relevant outside the web context, the language and runtimes will grow additional features -- thus the features provided by Mozilla's implementation which are attractive to the GNOME Shell hackers.

Here's an illustrative challenge for you: How do you write to stdout in Javascript, and if you can answer that, is your method a feature of the langauge or the runtime?

why should they pick a javascript engine?

Posted May 21, 2009 15:29 UTC (Thu) by jdub (subscriber, #27) [Link]

Gah, that was meant to be a reply to the comment above yours, and say "stderr" not "stdout". Thanks. :-)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds