Gnome Goes JavaScript
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."
Some body misplaced a calendar?
Aprils Fools is in two months time.
Read more about the reasoning and decisionprocess here:
http://treitter.livejournal.com/14871.html
Javascript is fine, it just give you enough rope to hang yourself. (and a little extra, as it turns out) The language itself has some patterns that allow for terrible patterns, and ambiguity, but all in all, I don't think it's bad. Waiting for someone to disagree...
This bit is kinda important :
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).
If computers were people, I'd be a misanthrope.
It's not another sign that javascript is taking over the world, but rather a sign that gnome is making bad decisions.
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...
loosely typed language without declaration requirements for methods/variables makes it such a huge pain in the ass to debug/understand/update source that I want to have nothing to do with it.
-SaNo
I went from using KDE exclusively to using Gnome exclusively back to using KDE exclusively.
The latest Gnome 3x sucks and is worse than the 2x series. The KDE 4x series is far superior to the flawed 3x series. KDE is on the right track with 5x while Gnome continues to stay on the wrong track doing things it's userbase isn't wanting it to do, taking features away which users love, "improving" the interface by making it harder to use or reducing flexibility.
Whoever is designing the Gnome interface sucks and this decision to choose Javascript over a language like Python, Ruby, or C#? Wtf are they thinking?
Javascript is about as elegant as an oil tanker. Considerable effort has gone into tools and libraries to make working in it suck less, but it's hard to wipe away the problems inherent in the design.
-- "So they told me that using the download page to download something was not something they anticipated." - Bill Gates
JavaScript is the programming language of a Gnome programmer; an elegant language for a more civilized age.
But hokey nonstandard libraries and ancient browser syntaxes are no match for a good object class at your side, kid.
Genocide Man -- Life is funny. Death is funnier. Mass murder can be hilarious.
Javascript is fine, once you divorce it from all of the browser peculiarities, but it's an untyped language and untyped languages suck for refactoring. They should never be used for complex apps requiring maintainability. And yes, that goes for python too.
Yeah, I know they said "apps," but even most apps quickly grow beyond the comfort zone of a script.
If only they'd picked ${my favorite language} instead of ${language I don't like} - all of Slashdot.
You are not alone. This is not normal. None of this is normal.
GNOME is an official GNU project (damned if I know why... GNUStep was there first). Guile is an official GNU Project. So why not Guile?
Riddle me this -- what's the official GNU javascript interpreter? Bueller? Bueller?
Exactly.
Do you even lift?
These aren't the 'roids you're looking for.
I can't say I like Javascript as a language but at least its ubquitous and more modern, lightweight and flexible than some other candidates. It's also far better than something heavy like Java or god forbid Mono which bring a lot of baggage in terms of runtime size and potential lawsuits.
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.
XFCE is the new Gnome. I hate both KDE and GNOME. Luckily there is XFCE (and LXDE).
Don't fight for your country, if your country does not fight for you.
At this point, I can only envision somebody at the head of Gnome saying, "Dammit, people are still using Gnome! Well, what else can we do to kill this thing?"
I think that more organizations switching to JavaScript is reflective of what the internet is and the market space that organizations have to live and compete within. While JS isn't a great language, robust, elegant, or [insert your adjective here], what it is is accessible. Anyone can start programming in JS today, with no special tools and little to no knowledge. It means that anyone can participate in the conversation (which is both good and bad). It's like Democracy, everyone can have their say whether or not their opinion is informed or not. Similarly, people who might not have a ton of programming experience or might not know the "right" language can and will be able to take their ideas to market more readily than before. Even if their idea doesn't succeed, it may end up spurring more seasoned programmers to do something similar or improving the idea or even helping newcomers build up their products and abilities. I think this is much more important than the theoretical purity of a language or the right or wrong way to program something. It's about conversations and it's about bringing people into the fold versus excluding them. It's about equality versus the typical snobbishness that can occur as the "elite" developers look down their nose at you because of the choice of languages versus the value of the idea you are attempting to promote.
"Do not be swept up in the momentum of mediocrity." - anon
" But I would never call JS elegant. "
When you do, then you can grab the stone from my hand, grasshopper.
Need Mercedes parts ?
Like languages (pick one) with strong typing so you know at compile time of trivial bugs that you'll never discover with JavaScript until you have exercised every path of execution that can reach your function.
"This mission is too important to allow you to jeopardize it." -- HAL
What is your definition of fast?
These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
it's better and faster than C
That's such a non-statement. Better in what way? Faster in what sense? In what situations?
-- Lattyware (www.lattyware.co.uk)
I'm one of the first C programmers and I've switched to js and node.js. it's better and faster than C.
Then you're doing it wrong. And if you had half as much experience as you claim to have in this and your other post, you would understand that.
Just because you've written some C, doesn't mean you know what you're doing. I've worked with plenty of 'programmers' who have been 'doing it all their life' or better yet, 'longer than you've been alive' (refering to me) and those statements universally come from people who suck and are too stupid to realize it.
You go on to further my point about you not really knowing what you're talking about when in other posts you talk about the x86 emulator written JavaScript as if thats supposed to be something to show how awesome it is. When you make that awesome emulator there out run my copy of QEMU without kmod, then perhaps I'll give you a listen, but you've got to be absolutely retarded to actually think JavaScript as a language has a technical reason for it to be faster than compiled C in reality, you being unable to write quality C withstanding.
Yes, decent Javascript can out run really really shitty C, but only if you stack the deck so that C doesn't have a chance first. Just because you've seen a porn, doesn't mean you know how to be a parent.
Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
Actually Perl with its CPAN.
These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
Python... heh. COBOL meets perl, they have a baby, BOOM, Python. Awesome. You were joking right?
These statements make it clear that you don't know very much about Python, and much of what you do know is probably wrong. That or else you are trolling.
Python was designed by Guido van Rossum (GvR), a computer geek who was also a math geek. He designed it to be clean and regular; there aren't a lot of weird punctuation operators like in Perl. It's a lot more terse than COBOL... well, anything designed later than 1960 is. I'll just bet the reason you even mentioned COBOL is the significant whitespace thing... oh wow, you're so smart, I'm impressed, really.
GvR based Python on a teaching language called ABC, and to some extent the C language. Regular expressions are credited as being copied from Perl but that's about it.
The Python community agrees that this is a good summary of the philosophy of Python:
Perl folks are proud of saying "there's more than one way to do it" and Python explicitly rejects this philosophy.
Isn't the selling point of Python that it has so many libraries and so much stuff in them you don't even need to do any programming?
The Python community does say "Batteries Included"... Python has a lot of useful stuff you can use. You said the above like it's a bad thing and I'm not seeing it.
The worst thing about Python is that it is a lot slower than other languages. I don't like Java as much as I like Python, but Java is at least fast. You can get a lot of useful work done in Python and it can even be fast, but the fastest Python is the code that relies on built-in features and C library code, so the fastest Python is the Python you didn't write.
Python is a much cleaner design than JavaScript. There are fewer land mines for newbies to step on. I'm a Python fan, but I'm not that worked up about the GNOME guys picking JavaScript.
But Python as a bastard offspring of COBOL and Perl? Nope.
Well, the first metric I saw when when a web server written in node was faster than Apache.
I know there's a lot of variables there, but still, when an interpreted language beats C for something like this, that's impressive.
TO be sure, you can do the kind of I/O js does in C, but it's a real pain and usually platform dependant in some way, even the difference between linux and bsd can start the ifdefs popping up, but js brings asynchronous I/O to the 10 GOTO 10 crowd. That, and the fact the js x86 emulator not only works but runs linux under which you can edit, compile a real program no slower than unix used to be on an 11/45 and you're doing this in a browser tab.
That's the metric I use for me to consider it fast. Obviously this is a contentious and complex topic, but as a rough approximation, I think it's fast.
Or at least it CAN be. The loops FB makes it jump through are insane and they manage to kill any js interpreter they throw at it and even the mighty V8 is now starting to strain so something will have to change there. But if they knew what they were doing it'd be as slick as it was performance wise 3 years ago, this isn't the fault of js, just bad (or no) performance profiling and tuning in Palo Alto.
So, while this may not mean any code you write will be fast, if you're used to real-time programming you'll love the language and the stuff you can do now with css3/html5 (gradients, css-masks) may not have the underpinnings of the next Pixar like NeXt did, there's still enough there to, say, keep the molbio crowd happy for the next decade with very fast real time renderings of molecules they can play with to cite one example.
I agree the success of is tied to the web, but so what, that's like saying the success of C was only because of Unix.
Need Mercedes parts ?