
JavaScript is the future...maybe - fekberg
http://blog.jonathanchannon.com/2013/01/09/javascript-is-the-future-maybe/
======
themgt
Agreed, maybe. All this "the language/platform is just a tool, become a better
carpenter" stuff is too clever by half. If you haven't played with
CoffeeScript + socket.io + express + etc recently, I'd highly recommend doing
so now.

I'm in a similar position of looking at node.js a year or two back and
thinking "this has promise", but gave up after hitting wall after wall, four
layers of callback-clusterfuck down, trying to do anything real. But things
have changed.

The combination of the crazy stupid money Google et. al have poured into VMs
with payoffs on the client and server-side, the scalability of event-driven
coding, the rapidly evolving breadth and quality of the node.js ecosystem, the
modern powerful feel of CoffeeScript, and the slick simple abstractions
provided by socket.io (why are there not compatible server-side libraries for
other platforms?!), really are starting to give JS that Yegge "next big
language" feel.

If you'd told me 5 years ago there'd be serious companies replacing
nginx/apache with a dynamic reverse proxy written in javascript, I would have
laughed in your face. Now it's reality.

------
krutulis
I'm baffled by people's obsession with finding The One Programming Language.
Would the world be better off if everyone spoke and thought in only English?

~~~
chr1
I don't think natural languages are a very good analogy for programming
languages. But the world where everyone can speak English, is certainly a
better place.

(disclaimer: English is only my third language)

~~~
gebe
Going off topic here but: I won't disagree with the utopian notion of a world
where everyone have a common lingua franca, I think that would be a good thing
as well. There being only a single language though, that's definitely not a
very positive thing.

------
anonymouz
I find the gray on gray-stripes very straining on my eyes and stopped reading.

<http://contrastrebellion.com/>

~~~
killahpriest
Agreed, but as a short term solution <http://www.readability.com/addons>.

------
jenius
I started programming with ruby, and was really pretty reluctant to move to
less clean languages - it was just hard on my eyes when I was used to reading
and writing clean and understandable ruby code.

But javascript won me over in the end, and I now write most of my apps with
node. Totally unrelated to hype or to this article or to anything -- the
reason why was mostly the challenges that came with switching to js. The two
challenges that particularly intrigued me were:

\- Making async code clean, readable, and manageable. As _themgt_ mentioned,
this is a really tough challenge. It took me months of going over and over my
code, continually reading about promises and async flow control etc. to really
"get it". And once I got it, it was really empowering, and the ability and
choice to run pieces of code in parallel or in series (which you don't get at
all with sync languages) is something I'm now very reluctant to give up.

\- Writing code that has more syntax (braces, semicolons, low level loops,
etc) and still making it clean and readable is a challenge that I think has
improved the way I write _all_ code for the better. It's so much more
difficult to make javascript adhere to the cleanliness standards that I'm used
to with ruby that I spend a lot more time thinking about how elegant and
readable my code is and optimizing it for that purpose, which I think nobody
would argue is a great thing for a developer to work on.

So without comment on whether javascript is "the" language or "the future",
which, as other people have mentioned, is silly to speculate, I would strongly
recommend picking up node and using it to build a few apps, if just for the
purpose of dealing with the two points I mentioned above : )

------
niggler
This was a disappointing article. Rather than focusing on the strengths of
javascript, the author is trying to sell TypeScript. There are many compile-
to-javascript languages, but the real strength lies within javascript itself.

In my experience, the JS ecosystem is really strong. v8 really pushed the
performance bar, and the upcoming features (stuff like Buffers/Views for
contiguous memory) make it possible to write programs that look and behave
like C programs. The breadth and depth of nontrivial open-source projects and
code segments is impressive, and the IRC communities are fairly vibrant.

I tried an arithmetic benchmark to compare JS performance between node.js and
vert.x. As it turns out, the JS implementations under node.js even smokes the
Java implementations!

------
FourthProtocol
As far as JavaScript goes he's not off the mark. The thing that saddens me a
bit is that it's yet another post about a particular
language/technology/thing.

No language/technology/thing is better than another. It may be better than
another in a particular context. This is as true for Android as it is for
Visual Basic and Arduino.

While this is obviously my personal opinion, I think the industry as a whole
might benefit a lot more from a post that discusses the pros and cons of
building a solution that targets say, the web, a phone, tablet and a desktop.
And how such a solution might do authN and authR, synchronise data using
store/forward, work in an offline scenario (aeroplane, underground, Gobi
desert...).

Talking about specific technologies in such a context is useful. It is even
more useful when considering environmental factors such directories,
monitoring software, privacy, advertising and so on.

~~~
PommeDeTerre
_No language/technology/thing is better than another. It may be better than
another in a particular context._

I don't really buy into this reasoning. If a given language is worse than
every other in almost every context (the "global" context, if you will), then
it's clearly an inferior language relative to the others.

JavaScript does exhibit this. It has exactly one thing going for it: it's the
only scripting language widely available in web browsers.

Aside from that, it's inferior to most other languages in almost every
respect. Its syntax is mediocre. Its semantics are inconsistent and often
outright confusing. It's missing critical features that are essential for
anything but the smallest-scale development. Its performance is only just
somewhat poor today, due to a huge amount of effort from Google and others,
otherwise it was downright abysmal in its early implementations. Its libraries
are more bandages for its numerous problems, rather than tools that empower
developers. The supporting tooling is quite bad (Chrome's developer tools or
Firebug don't compare to a real debugger, for instance). The community leaves
a lot to be desired, especially given the high amount of ignorance and the
extremely bad "advice" that is passed around so often by its members.

We shouldn't be politically correct when it comes to technology. Some
programming languages are worse than others, and we shouldn't shy away from
saying this. JavaScript is an inferior language, like it or not.

~~~
MJR
_It's missing critical features that are essential for anything but the
smallest-scale development._

What in your opinion is smallest-scale development? Millions of users using
your application each year? Do we need web apps to support billions of users
each year now?

JavaScript is the most superior scripting language widely available in web
browsers. Until there is an alternative it cannot be an inferior language
because there is nothing equivalent on which to base a comparison.

~~~
PommeDeTerre
I was talking about code base and application size, not so much the number of
users.

Using JavaScript for a large application is not a pleasant experience. I know
there are a lot of JavaScript developers out there who have never used
anything but JavaScript, and maybe PHP, so they don't know what they're
missing. But those of us who have used even just C++, Java, C#, or Delphi will
know how critical things like static typing, namespaces, proper modularity and
class-based OO, for example, are.

------
egeozcan
Author has some good points. What I don't like is this superficial "the
future" label. Hopefully, "the future" won't be about just one technology. In
my opinion, it should be more about using the right tool for the right job.
Even though I'm a big fan, it's obvious that JavaScript is not the answer to
all of you casual programming questions, let alone the very complex ones.

------
kodablah
It might seem trite, but a CoffeeScript + TypeScript combination would make me
very happy. I have been developing in TypeScript recently because the IDE
support is awesome (and I'm a static typing enthusiast). Now if I could just
reduce the verbosity and save some keystrokes...

------
forgotAgain
From reading the post it seems that JavaScript is the future if Microsoft
supports it.

------
atomical
What important/high traffic sites run off Node?

~~~
jedireza
Trello.com hit a million users yesterday.

------
programminggeek
Um, JavaScript is cool and all and you can use it in a lot of places, but for
things beyond nontrivial apps, Node.js is going to be hard to scale to larger
teams. Maybe that is a good thing. Maybe having a bunch of smaller services
talking to each other is the way to go, but so far node hasn't solved the
inherent callback soup problem.

~~~
crazygringo
I worked on a Node-backed website with a team for a year, and we had no
problem with callback soup. However, we did use IcedCoffeeScript which made
dealing with callbacks a lot easier. But, scalability-wise, programming in
Node was no different from any other language. What do you think makes it hard
to scale?

