Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Node seems to evoke strong responses from people. As someone who has a couple of side projects running on Node in production, and also as someone who considers himself fairly language/platform agnostic - I will say this:

For a lot of people - Node allows them to do a lot of things that was previously non-trivial in Ruby or Python land. From comet based applications to using socket.io for real-time notifications. It's not that these things can't be done in other platforms. There have been plenty of Java COMET solutions. Heck, 3 years back I wrote my own multiplayer strategy game in Erlang/OTP. However today, if I were to write that game - I will do that in Node. Reactor pattern is nothing new - but if you work with Node you will realize that for certain classes of problems, neither event machine nor twisted come close to Node and its ecosystem today.

Yes, C++ servers could be faster and JS can be a terrible language to work with. But a lot of us don't care - we want to get work done and we use Node for stuff that it's good at. There are always going to be people using it for everything - but every community has its set of zealots. Someone said the other day that he/she uses Haskell for prototyping.



For a lot of people - Node allows them to do a lot of things that was previously non-trivial in Ruby or Python land. ...for certain classes of problems, neither event machine nor twisted come close to Node and its ecosystem today.

This is the kind of stuff that causes the backlash. The JVM doesn't exist? Erlang doesn't exist? Why did the Node people insist on building a new ecosystem from scratch? Wouldn't it have been easier to build on something that was already mostly working (and already supported multicore)?


Erlang may as well not exist for the vast majority of developers. I like Erlang, but a lot of people don't get it, and even more are completely unaware that it exists. Meanwhile, JavaScript is already one of the biggest languages on the Web. This is actually one of Node.js's intended strengths.

The JVM is really mature, but its primary language is one many people hate, so people would complain about choice of platform even if they had gone that way. You may as well ask why Ruby on Rails wasn't Java on Rails. The answer is that 37signals didn't like Java.

And V8 and JavaScript already existed when Node was created, so they were building in an existing ecosystem. Again, JavaScript was already one of the dominant languages on the Web. That's a big argument in its favor.

To my understanding, JavaScript had one more advantage that put it over the top: what didn't exist in its ecosystem — namely, a culture of synchronous development. This meant Node wasn't fighting against the idiomatic way to do things. JavaScript was already highly async, and since this was the whole idea behind Node, it made JavaScript a less-bad fit than most other languages. Other languages were considered, but the fact that libraries for those languages were largely synchronous was viewed as a downside.


Since when did people do not like Java? And still it is the most widely used computer language? And how many people like Ruby, Python by the way? Hype is indeed stranger than reality.

You should choose languages and platforms that fit the task at hand. Every language is as good as the programmer who wields it as long as it suits the purpose. Hating a language is hardly the way to get things done. After learning and working on dozens of languages I am very language agnostic - a new language takes at most a week to get to moderate proficiency now. Make systems that work rather than bitching about your new pantyhose.


I'll toss my two cents in.

Java is one of the few languages in existence that I actively avoid (Symbian's particular flavor of C++ is the other).

I've heard it best described as being a very "bureaucratic" language and I think that sums it up perfectly. Checked exception and the rigid language rules just make Java really painful to develop with.

For a long time folks went with Java by default. Usually tossing around something about how impressive the standard libraries are. That's an advantage that doesn't really hold today. Python and Ruby (in particular) have developed amazingly strong third party and standard libraries that allow you to accomplish almost anything, and do it with way less pain than Java insists on inflicting.

Amazing things have been accomplished with Java. Hell there are immensely talented programmers who prefer Java. I'm just not sure that's really that common anymore.


Java is the most widely used computer language because it's the lingua franca of the enterprise. That doesn't reflect the programming community's love — it reflects the approval of big business executives. Some programmers genuinely love Java, but I'm pretty sure it's a much smaller number. In the startup scene, where technical founders pick the stack, Ruby is actually more widely used. Take a look at the HN Jobs category (linked at the top of the page) and count the number of Ruby web dev listings, then count the Java web dev listings.

(Cheat sheet in case you didn't feel like counting: There are zero listings for server-side Java. The only Java listings are for Android.)

You can argue that it shouldn't be this way, but that is how it is. A lot of people hate Java. Rails' whole initial marketing campaign was essentially "Java sucks — we do everything opposite of them."


And you think HN is the horizon of entire programming world? Hope that is a self fulfilling prophecy. If you believe HN, Ruby is taking over the world - but in reality, Ruby use is going down (http://www.tiobe.com/index.php/content/paperinfo/tpci/index....). If you really want to know which language is gaining popularity fast - it is a pretty old language called Objective-C! Recheck the reality distortion field.

And about love - I have a family to love - programming languages are tools - hardly objects to love or hate.


You seem to be disagreeing very strongly with a bunch of things I didn't say. Let me clear up a few misconceptions:

1. I don't believe Ruby is taking over the world. Six years ago it was, but now it's fairly mature and stable. I do believe that Ruby is better-loved overall than Java. (Incidentally, you'll notice Java is dropping two orders of magnitude faster than Ruby on TIOBE's chart.)

2. I have been programming Objective-C since 2001 when OS X came out. I'm pretty familiar with it.

3. HN is not "the horizon of the entire programming world," but it is pretty well-embedded in the Silicon Valley startup scene, which is what I was discussing at the time. My point is this: Take a look at any area where passionate coders get to choose any technology stack they want and you will find Ruby is generally more popular than Java. If HN's job listing isn't convincing to you, let's take a look at another place where coders choose their own language — open source. On Github's ranking of most popular languages, Ruby is #2 and Java is #5.

4. I am not trying to convince you that you should love or hate any languages. I am saying that many people do, and their feelings towards these languages affect how they behave.

As a side note, I agree that programming languages are tools, but honestly, most artists and craftsmen I know do have favorite tools — a favorite violin, a favorite kind of film, etc. Heck, many people have a favorite chair. It's OK if you don't, but it's not that weird.


I would believe it on the basis that every programmer I've talked to, from a couple of years after Java was introduced, until today, didn't really like Java. Things became very complex very fast for the language that gave birth to FactoryFactoryPattern.


I own tools that I love and tools that I hate.


I agree with your post, but wanted to pick up on one point:

Erlang may as well not exist for the vast majority of developers. I like Erlang, but a lot of people don't get it, and even more are completely unaware that it exists.

This was also true of Ruby pre 2005. I'm not an Erlang developer but it clearly has some natural advantages in the increasingly important world of parallelism and maybe it just needs its own "Rails" as a catalyst for its take off? (And by "its own Rails" I don't mean a Web framework but just a MacGuffin that lures people in to trying it.)


Half of it was true for Ruby — many people were unaware. What they don't have in common is people's immediate reaction upon discovering the language.

Common first exposure to Ruby: "Oh, wow, that's cool. It looks pretty easy."

Common first exposure to Erlang: "Oh, wow, I didn't know you could code in Klingon."

I do agree, though, that Erlang could probably gain a lot more popularity if somebody introduced a framework that really showed what it could do. The most popular web framework right now (at least I think it's the most popular — there aren't any official polls or anything) is MochiWeb, which kindasorta doesn't have any documentation.


MochiWeb is a web server, not a web framework. People use nitrogen(1) and webmachine(2) over it. Nitrogen is a pretty fully featured framework, and webmachine is a really light layer that bakes in http/REST semantics.

I pretty much exclusively use webmachine with ErlyDTL (an implementation of the Django templating system) on top.

There's also erlangweb, and a few others. Both nitrogen and webmachine are pretty well documented. I think it's still all of the periods and arrows that are scaring people off.

(1) http://nitrogenproject.com/ (2) http://wiki.basho.com/Webmachine.html


Given the visceral reactions to the syntax, perhaps Erlang could be boosted via a CoffeeScript-esque language that compiles down to it? No idea how practical that is with Erlang's idioms but CS helped some previously JS-shy folks get on board.


There already is one: Elixir (http://elixir-lang.org). It's created by Jose Valim, who (as you probably know) is also a member of the Rails core team. It's a very interesting language.


Ah, cool! I knew he'd gone off to build something new but hadn't realize it was Erlang based. Thanks.


A web framework built on top of Elixir would do it.


Why did the Node people insist on building a new ecosystem from scratch?

People don't sit and plan about creating ecosystems. Things happen. It's not like the Erlang or the Java community are not building anything (Akka is very impressive). I would rather appreciate the work that has gone behind Node. Hype or no hype, the sheer number of knowledgeable people associated with it lends credence to the fact that it's well suited for atleast some classes of problems.


Well, to be fair they didn't invent a new language.

I am very happy with our Java-based infrastructure now, but it took two years to get there. The ecosystem is all over the place, is sometimes unwieldy (e.g. Maven) and huge chunks of it have withered and fallen off (e.g. EJB). This is healthy, but does not help developers choose what path won't lead to a dead-end. In our case it was a combination of something old (JDBC, Spring) and something new (Netty, Redis).

For Node it seems the big selling point is in having relatively few options to choose from after "Hello, World". This I think makes it seem nimble. Eventually it'll cruft up just like Java: There will be way too many ways to do everything, people will start arguing about it, and something perceived as "simpler" will take its place.


As someone who has extensive Java and JavaScript experience, the whole reason for the Java hate as a language is it's lack of closures. For any callback you have define a new interface explicitly then do a gnarly anonymous inner class. In JavaScript you can just plop in an anonymous function. As for the ecosystem, Node also wins with NPM for ease of installing third party libraries, but Java wins for more comprehensive libraries that are already battle tested. A lot of Node libraries do reinvent the wheel.

I don't even know what the standard way of installing a new library is in Java. There's Ivy, Maven, and Gradle. Out of all of them Gradle seems to be the best, but least used.


This might answer your question: http://www.youtube.com/watch?v=SAc0vQCC6UQ

TLDR: He didn't want to use an ecosystem that had existing blocking code. He wanted node to be pure in te sence that nothing was blocking. Starting on a clean slate enabled him to get everything pure non-blocking from the ground up. He admits that Js isn't the best language. But his rationale for not using an existing ecosystem (when it comes to IO) is not bad.


A nice client-server library in an existing ecosystem would've helped the world more. Oh well.


I'm curious, why would you write that game in Node now, if you already know Erlang?

From my perspective, Erlang is a better fit than Node for all the problem domains that Node is good at. I understand using Node if you don't know Erlang, but do know JS, but if you're already skilled with Erlang...


Erlang string/unicode handling amazes me! AFAIK no native support for strings.

I have zero experience with Erlang so want to ask: does this cause problems in practice? Especially, does all library code needing strings use the same Unicode representation?

http://www.erlang.org/doc/man/unicode.html


Using Haskell for prototyping has its uses!...prototyping for the formal verification of an operating system, for example... :P [1]

[1] http://www.ssrg.nicta.com.au/publications/papers/Klein_EHACD...


> Someone said the other day that he/she uses Haskell for prototyping.

So...?


For a lot of people - Node allows them to do a lot of things that was previously non-trivial in Ruby or Python land. From comet based applications to using socket.io for real-time notifications. It's not that these things can't be done in other platforms.

One of the problems I have with the hype around Node is that people seem to gloss over the fact that asynchronous IO is only really dramatically more useful for the particular case of wanting to have a lot of connections that are open and idle most of the time. Many people, instead of saying “Node is great for comet because of asynchronous IO” say “Node scales really well because of asynchronous IO”, when in fact those 2 statements are very different.




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

Search: