Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
GNOME Programming News

Gnome Goes JavaScript 387

mikejuk writes "Much to most programmers' shock and dismay Gnome has made JavaScript its main language for apps. It will still support other languages and it still supports C for libraries, but for apps it is JavaScript that rules. JavaScript seems to be a good choice for Gnome 3, as the shell UI is written in the language. It is also consistent with the use of JavaScript in WinRT, Chrome Apps, and FirefoxOS apps, and generally the rise of web apps. As you might expect, the initial reactions are of horror at the idea that JavaScript has been selected rather than the favorite language of the commenter. There is a great deal of ignorance about (and prejudice against) JavaScript, which is often regarded as an incomplete toy language rather than the elegant and sparse language that it actually is."
This discussion has been archived. No new comments can be posted.

Gnome Goes JavaScript

Comments Filter:
  • Read more facts here (Score:5, Informative)

    by Anonymous Coward on Monday February 04, 2013 @02:28PM (#42787313)

    Read more about the reasoning and decisionprocess here:


  • by eksith ( 2776419 ) on Monday February 04, 2013 @02:33PM (#42787361) Homepage

    This bit is kinda important :

    For system libraries the language of choice is still C.

    The Gnome folks don't have a deaf ear, it seems, since they proactively acknowledge JS isn't a lot of developers' cup of tea... And the anti-JS vitriol is something that doesn't make sense to me, but whatever (note: I don't use it in app work, but that's only because I found another language I know).

    As you might expect, the initial reactions are of horror at the idea that JavaScript has been selected rather than the favorite language of the commenter.

  • by MrEricSir ( 398214 ) on Monday February 04, 2013 @02:36PM (#42787389) Homepage

    What the summary seems to be leaving out is this: Javascript will be the language they suggest n00bs who want to learn Gnome programming start with.

    That's really the only change being made here. They're not re-writing apps in Javascript, they're not removing existing language support. This is purely an advisory statement for first-time Gnome programmers.

  • by mike.mondy ( 524326 ) on Monday February 04, 2013 @02:38PM (#42787425)

    From the TFA and the blog linked from the TFA:

    During the GNOME Developer Experience Hackfest this week, one of the major goals we identified was the need to pick a *single* language to give a simple answer to "how do I write a GNOME app?". [emphasis added]

    Why only one?

    * It allows us to focus when we write developer documentation, fixing bugs in the development environment and the development of tools. This reduces our maintanence costs and enables us to be vastly more efficient.
    * It enables code and knowledge sharing to occur, so that people can easily copy and paste code from existing applications, or find information about common problems and challenges.
    * It provide a coherent and easy-to-follow path for new developers.
    * It allows us to include the full GNOME framework within the language itself.

    But also:

    We will continue to write documentation for other languages, but we will also prioritize JavaScript when deciding what to work on.

    I wonder how much harder it would be to support LUA, python, tcl, and some of the other common languages. Or whatever comes next...

  • Re:Enough rope (Score:5, Informative)

    by jythie ( 914043 ) on Monday February 04, 2013 @02:41PM (#42787451)
    Python has also made some good advances for those criteria, esp if you couple it with something like wxPython.
  • Re:Enough rope (Score:4, Informative)

    by hobarrera ( 2008506 ) on Monday February 04, 2013 @02:52PM (#42787597) Homepage

    PySide [qt-project.org] is quite powerful as well, and can be used for both desktop and mobile development.

  • by Anonymous Coward on Monday February 04, 2013 @03:05PM (#42787741)

    This kind of false reporting seems to be occurring more frequently around here. Either the editors really are as incompetent as their grammar typically suggests, or they are deliberately misleading us in order to generate traffic.

    I say we have a slashdot poll on it.

  • Re:Enough rope (Score:5, Informative)

    by Dcnjoe60 ( 682885 ) on Monday February 04, 2013 @03:12PM (#42787809)

    Python has also made some good advances for those criteria, esp if you couple it with something like wxPython.

    The developers talked about python quite a bit, but what caused them to go javascript as the recommendation for n00b gnome developers is that is (javascript) is so pervasive in other systems that it is likely they will already be exposed to it and can build upon that. If you are doing web, iOS or Android programming, chances are you are or have used javascript. That plus all of the gnome-shell stuff being done in it makes it kind of a no-brainer as that is what a lot of new developers are interested in extending.

    The gnome developers went out of their way to explain that python, c and are all still fully supported and that javascript is just what they are steering new developers to when asked the question about what language.

  • by Dcnjoe60 ( 682885 ) on Monday February 04, 2013 @03:20PM (#42787895)

    Python is a language which makes app writing very easy. It's very easy to write, read, debug. It's also very fast when used right or modified.

    This decision in my opinion is one of the boneheaded decisions which will be Gnomes final nail on the coffin. They had a chance to rule the Linux desktop with Ubuntu and since Gnome 3.0 have threw it all away. Everything that made Gnome great with the 2x series seems to have been lost at 3x and their release schedule is so slow that we are probably going to be stuck on 3x for 10 years. Goodbye Gnome and welcome back KDE.

    You are welcome to your opinion, but since gnome-shell is written in JS and most new developers want to work on things that tie into gnome-shell, it seems to make a lot of sense to steer them to JS. If you took the time to actually read what the gnome developers are putting forward, you would find that they are officially recommending JS for new developers who are looking how to quickly become productive in developing for gnome. They are still fully supporting c (libraries still are in c) python, vala and any other language that has bindings to the gnome libraries.

    Obviously, if you are a C programmer, you will probably continue to program in C, even in gnome. That is, unless you want to write extensions for gnome-shell, in which case, you will program in JS as that is the language gnome-shell is written in. The same is true for C++, python or any other language.

    Once people get past the knee-jerk reaction to the work "javascript" and look at what gnome developers are proposing, it makes a lot of sense. Basically, they realize the entry bar to developing in gnome is quite high, so since so much of gnome already uses JS they are going to make tutorials for beginning developers on how to use JS to develop for gnome and recommend new developers use JS to develop for gnome. Experienced developers, or any developer for that matter, are still free to use any language they want.

  • Re:Enough rope (Score:5, Informative)

    by rs79 ( 71822 ) <hostmaster@open-rsc.org> on Monday February 04, 2013 @03:35PM (#42788103) Homepage

    If you're unclear why, watch the 8 hours of doug crockford's videos about and and you'll get it. there's a lot more academic rigor in js than most people have any idea about. it's good stuff.

  • Re:Enough rope (Score:5, Informative)

    by jythie ( 914043 ) on Monday February 04, 2013 @03:38PM (#42788145)
    Yeah, that produces a bit of a barrier. Once one has a good feel for what works everywhere and what does not it can make a good tool (I develop wxPython apps for Linux/Windows/OSX) but the 'oh wait, that doesn't work here' traps can be discouraging. Their documentation has improved significantly in that regard though.
  • It's mainly a product of the weak typing - doing [] + {} gives you an object, while {} + [] gives you 0. That's not useful when you have a problem you are trying to debug. Python follows the idea that things should fail loudly so that bugs are made clear. The indentation thing is overstated - text editors are not that terrible, and if they are, use a different one. It makes the code far nicer to work with and read.

    Firstly, don't blame the language for the programmer - anyone can be a rubbish programmer in any language. As to your examples, I find it funny you manage to pick an incredibly hard thing to do in Python - if you open a file and iterate over it, the default method (without any special work from the programmer) is to do so lazily, so there is not a massive file read into memory. The whole Python core library is built around the iterator interface, which means most data is processed lazily without having to even think about it.

    As to your last comment, Really? PHP has a host of problems - mainly due to the way they update the language without removing old stuff, and add features haphazardly. This leaves you with twenty different ways to access a database, etc..., etc... Python, on the other hand, has specifically avoided this. 3.x has gone back and fixed core language problems where they existed, and made the experience much more consistent. This is a sign the language is being curated and nurtured, not hacked on like JavaScript or PHP.

"So why don't you make like a tree, and get outta here." -- Biff in "Back to the Future"