Hacker News new | past | comments | ask | show | jobs | submit login

There's absolutely no question that javascript is going to be the single most important langugage for GUI app development, if it isn't already.

However, I'm still not persuaded that it's a compelling server-side programming language. Javascript wins in the browser because it has no competition, but there are already several mature, well-established server-side programming stacks in langauges with fewer warts.




I've recently been using it as part of CouchDB. It's really not a bad language. Some of the constructs are a little cumbersome, but it does just about everything you'd want a language at that level to do.

With the V8 engine it really is pretty speedy, and you have the advantage of using the same language for your UI and your server-side processing.


As a language, I feel like Javascript decided to repeat half the mistakes Perl made and to tack on a few unique ones of its own. Supposedly the latest version, ECMAScript 3, improves on javascript a lot, but in the end I would pick Python or Ruby over javascript any day. The section about javascript at http://james-iry.blogspot.com/2009/05/brief-incomplete-and-m... is funny because it is true!

It's too bad that Javascript has become the assembly of the web. I've found GWT to be a terribly leaky abstraction. I've watched as projects like HotRuby stalled and faded. And I've seen projects like the scala version of j2js grapple with performance issues such as inefficient method call overhead in current javascript implementations. I really believe that javascript at this point is holding back progress on the web.

I really hope something like google's NACL succeeds where all the other RIA frameworks have failed. To do so, it is going to have to integrate with the browser much better than applets, flash, etc, but if it succeeds it could allow for a multi-language renaissance on the client that would benefit everyone and force javascript to actually compete with the rest of the PL world.


I love Python the language and all the great libraries that come with it. The reason I chose JavaScript for server side has a lot to do with V8. Also, if you follow best practices for coding styles and use JSLint, javascript is very powerful.


Reading up on the NACL project now. Amazing stuff.


Sure. I have no doubt that it's capable. But that's not good enough. You have to be significantly better than an entrenched technology to displace it and the only thing I think server-side JS really has in its favor is that people will presumably already know Javascript and right now that just doesn't seem like enough of an advantage.


> There's absolutely no question that javascript is going to be the single most important langugage for GUI app development

It might or might not be, but this is far overstated. In terms of rich graphical GUI apps, there is much much more that has been done with either AS3 or Objective C at this point.

I think Javascript optimists vastly underestimate the distance it would need to go to replace either or both of the above.


I have been working on a project that required clients be implemented in both Obj-C and JavaScript. They are functionally equivalent. The code base of the Javascript version is close to 20 times smaller and was coded about twice as fast. I much prefer Javascript for UI work.


Out of curiosity, which did you write first?


objective C, but the JavaScript version was my first substantial JavaScript program.


I still haven't seen anything in AS3 or Objective C that compares at all to the state of the art in native C++ interfaces (Photoshop, Cubase, Autocad etc), but that's not the 85% that counts. Javascript/HTML5 clearly has the momentum. If there's not 10x as much code being written five years from now in JS as Obj-C/AS3 I'll be very surprised.


Are you really calling photoshop and autocad state of the art in user interfaces? While I certainly appreciate the power and features offered by both apps, the actual UI is really nothing to write home about. Sure they get the job done and generally stay out of your way (once you've gotten the hang of them), but there is really nothing cutting edge of even slightly interesting about them.


I'm picking familiar examples. Consider Ableton Live or Metasynth instead.


I think what you are really talking about is the DOM, not javascript the language.


The DOM and built in libraries are of course terrible, but I really am talking about the language. Mainly it needs an object system where different programmers' versions of objects can interact with each other easily and seamlessly in the same way. It also suffers badly from not having a real dictionary type. (Objects are slow, and checking for hasOwnProperty() is a pain in case you import something from someone who thought it was brilliant to extend the Object prototype.)

The magic 'this' parameter is a complete mess. Global scope by default for variables and no block scope is terrible, as is changing scope of variables from global to local if I later add a "var" version later on in the function. (Sure we should avoid global variables but they shouldn't be so easy and encouraged, without a real namespace system.)

Newlines acting like semicolons bites people a lot that I've seen as well. I hate the inconsistency in the object literal syntax. I need to quote the left side of them anyway, e.g. {"interface":"my-interface"} will break otherwise, so why not make it consistent and allow a variable, so I can pass {key: value} into a function requiring a dictionary? I also hate the inconsistency of keywords. Why can I redefine "undefined" and "NaN", but not "interface" or "super"?

Some of these are warts but not having an agreed on object system is a show stopper for general use, imo. Who rolls their own prototype system in Java? Nobody. Who rolls their own imitation of classical objects in JS? Most people.


> Mainly it needs an object system where different programmers' versions of objects can interact with each other easily and seamlessly in the same way.

It has one, as long as you don't need to inherit from other people's objects. But inheritance is a pretty poor way to compose code in most OO languages, especially single-inheritance ones like JavaScript and Java.

> Who rolls their own prototype system in Java? Nobody. Who rolls their own imitation of classical objects in JS? Most people.

Well, a few people. Mostly people familiar with class-based programming languages, which you are surely aware is a minority of the JS-programming population. One of the first things I did in Python was roll my own prototype system, actually.

I really think you should organize your points better. There are some really serious flaws in there (the need for hasOwnProperty() and global-by-default) but you've mixed them indiscriminately with minor annoyances (keyword inconsistency, the absence of classes, no block scope).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: