BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News JavaScript Now First Among Equals on GNOME

JavaScript Now First Among Equals on GNOME

This item in japanese

The GNOME project recently concluded a Developer Experience Hackfest where the controversial decision was made to declare JavaScript the default language for application development on the GNOME desktop environment. The stated reasoning for this decision was to simplify the development process so that a standard set of documentation, best practices, and developer toolset can be focused on.

The decision to promote JavaScript as the primary language sparked immediate controversy as commentators either criticized JavaScript specifically or lamented that their language of choice was overlooked. Travis Reitter, a member of the GNOME Foundation and a hackfest participant, cited several reasons for the decision:

  • Our language of choice needs to be dynamic and high level.
  • There is already momentum in the GNOME Project for JavaScript -- it's used in GNOME Shell and GNOME Documents.
  • There's a lot of work going into the language to make it especially fast, embeddable, and framework-agnostic.
  • JavaScript is increasingly being seen as a first class desktop programming language -- it us being used in Windows 8, mobile platforms, and for local web applications.
  • JavaScript is self-contained -- it doesn't come with its own set of core libraries, which makes it more convenient for us when integrating it into the platform.

Reitter was quick to note that even with this decision regarding application development, C remains the recommended language for GNOME system libraries. The choice of JavaScript does not mean support for other languages will ignored, but JavaScript will take precedence for both documentation and developer tool support.

The announcement brought forth a lot of commentary. Sriram Ramkrishna wrote in part,

“...I think what people are concerned about is the fact that one language could lag behind others. A situation we already have today. So if you do decide to use another language there is a risk that important updates will not propagate to the language they are using. There should be some assurance that developers who do use something other than javascript will be able to see timely updates on the bindings of the language of their choice.”

Tristan Van Berkom commented on a desire for GNOME to have a native language:

GNOME needs a language that is *our own* much in the same way that the NextStep Objective-C implementationbelongs to Apple The reason I say this is that the usefulness of a high-level language like this; is that the language is a window into our platform, and so can leverage platform specific features (and by platform here I mean the GObject/GIO/Clutter/GTK+/etc stack)

Vala *is* the obvious choice because it allows us to expand on the syntax and leverage features that are specific to our platform, using vala will allow us to leverage features in GtkBuilder more sensibly in the same way that Objective-C leverages the NextStep environment, and who knows where it will lead.

Vala was developed to provide GNOME application developers with an alternative to C# and Java. Yet JavaScript was chosen over this language. Reitter comments that:

"A large reason to prefer JavaScript over Vala is the huge installed base of people both already committed to using JavaScript (ie, it's the preferred language for Windows 8 development, Firefox OS, some mobile platforms) and particularly the wealth of people working to make JavaScript fast and stable."

Keith Curtis made his comments known through a separate blog post:

It is great that they are trying to use a garbage-collected language for as much code as possible. For a component-based shell UI, Javascript is surely better than C, C++, or Java. I realize they started down this road towards Javascript years ago, but I think it is worth re-considering whether they are on the right path.

With big decisions, it is nice to have a paper trail. I can find no supporting documentation backing up the decision other than one blog post written after the fact, which doesn’t give very much information.”

By way of comparison, contributors to the KDE project utilize C++. Application writers can pick from C++, Python, Ruby, C#, and Perl. Lightweight KDE applications called Plasmoids can be written are supported in C++, JavaScript, Python, Ruby, and QML (“essentially a forge between CSS and JavaScript”.)

Rate this Article

Adoption
Style

BT