LWN.net Logo

Some details

Some details

Posted Feb 6, 2013 12:59 UTC (Wed) by man_ls (subscriber, #15091)
Parent article: Reitter: Answering the question: "How do I develop an app for GNOME?"

I expected to see some technical questions in the discussion, instead of rehashing the usual complaints about the language.

  • What virtual machine is this thing running on? Apparently GJS, which is based on Mozilla's SpiderMonkey; at least we can expect good performance.
  • Will they try to tackle the rich ecosystem (and momentum) around node.js? At least, retrofitting a web server (which was in turn adapted from a browser) for desktop usage would be a fun experiment.
  • What level of language compatibility can be expected? JavaScript is a dangerous minefield of incompatible implementations.
  • What about compatibility with other languages? Right now C is chosen because it is the most compatible: most languages can access C libraries. Will it suffer?
There is surprisingly more discussion of this type in the blog post, something I would not have expected on LWN.net. Some of these points are tackled, some not.


(Log in to post comments)

Some details

Posted Feb 6, 2013 15:01 UTC (Wed) by nye (guest, #51576) [Link]

>What level of language compatibility can be expected? JavaScript is a dangerous minefield of incompatible implementations.

I've only really come across complaint from people talking about the DOM, not the language itself.

Are there deeper implementation incompatibilities that I'm not aware of?

Some details

Posted Feb 6, 2013 16:28 UTC (Wed) by man_ls (subscriber, #15091) [Link]

There are incompatibilities at all levels across JavaScript implementations: In practice web devs often assume that the latest version of all browsers have all the standard features -- until they find a feature (or a stupid implementation detail) that completely breaks some old IE version and have to back up. Real world example: IE 6 does not accept trailing commas in object definitions, and it refuses to render any page that contains them.
var object = {
  attr1: 'cheese',
  attr2: 'runny',
}
Note the comma after 'runny'; a pretty core language feature, and useful I would say. Even the much-hyped node.js has pretty serious limitations in support for ECMAScript 5.

Some details

Posted Feb 6, 2013 18:15 UTC (Wed) by nye (guest, #51576) [Link]

I don't really see this as being particularly different to other languages. Most of that seems to be about trying to use newer features in older implementations, which isn't something I'd really expect to work (rather like trying to use C++11 features in GCC2.95).

IE6 is always the anomaly in this kind of thing, in that it had so many bugs even at the time, but I think if anyone is currently considering developing for Gnome but only willing to write in the specific JS dialect available in IE6 then they probably have bigger problems.

Obviously if the implementation they're using only supports older language versions that people are used to using then there is a problem, but if anything it's likely to be the other way around.

A bigger potential for problems would be if there are certain language constructs that work in different JS versions but do *different things*; I have no idea if that could be the case.

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