
For modern development, Javascript is just something you need to learn - timruffles
http://sidekicksrc.com/post/for-modern-development-javascript-is-just-something-you-need-to-learn/
======
jpgvm
I'm sorry but I have to side with the JS is utter crap crowd.

The single redeeming feature of JS is that it's implemented in all current
browsers. If it wasn't for that fact I doubt anyone would have cared much.

It's just nowhere near as good as current alternatives for application
development. Everything it can do another language can do better, except run
in a browser - which is entirely out of control of the other languages so
somewhat of a moot point.

~~~
DougWebb
I'm sorry but I have to side with the "oxygen is utter crap" crowd. It's too
reactive, causing all kinds of materials to degrade, and sometimes they even
burst into flame! Helium, Neon, Argon are much better, but even Nitrogen,
which isn't perfect, is better than Oxygen.

The single redeeming feature of Oxygen is that it's pretty much everywhere,
and yeah sure we can all breathe it and don't have any other choices for gases
to breathe. If it wasn't for that fact I doubt anyone would care much for it.

Ok, I'm paraphrasing and extending what you said to make my point...
Javascript being in every browser, to the exclusion of all other languages, is
a _huge_ factor in its popularity and utility, and it's the main driving force
towards improving the language. If Javascript didn't become the in-browser
language, it probably wouldn't have existed at all. Instead we'd have some
other small language with similar design flaws, or maybe Perl would have been
adopted as the in-browser language. At the time it was the main language for
server-side web development, it was already embeddable and used for in-app
scripting (like Lua is today), and I recall a browser extension for Netscape
that let you use it instead of Javascript. IE, of course, would only have had
VBScript.

Pick your poison.

~~~
candydance
I didn't see a point, just a bunch of facts and a smarmy, self-righteous turn-
about comment. If I could downvote it, I would.

The parent comment said "Javascript is a bad language but it's incredibly
useful because it's in every browser." and you just agreed with him after
writing a bunch of sarcastic drek.

~~~
DougWebb
No, jpgvm said that Javascript is "utter crap" that no one would care about if
not for the fact that it's implemented in all current browsers. She/he never
said anything about it being useful. My point, which appears to have gone over
your head, is that you can't dismiss one of the key aspects of Javascript's
value and then call it "utter crap".

~~~
candydance
Uh, no. He specifically mentioned that running in the browser is why JS is so
widely used, even though the language itself is worse than alternatives.

>The single redeeming feature of JS is that it's implemented in all current
browsers. If it wasn't for that fact I doubt anyone would have cared much.

>Everything it can do another language can do better, except run in a browser

That's the exact opposite of dismissing a key aspect of Javascript's value,
that's explicitly acknowledging it.

------
nbevans
"The intrinsic smallness of the language can be alarming when you come from a
bigger language (Ruby, Java)"

Bad examples. Ruby and Java are small languages too, just like JS. This
immediately calls into question the credentials of the author. Not a good
start.

"Null everywhere Attempting to access a property of a JS object that’s not
defined gives you… undefined. If it’s important to your program that you know
about this: write some code."

Or just, you know, use a better language?

"‘Callback hell’ isn’t a problem for people who’ve written a lot of JS."

So that makes it okay then?

It's just another article written by someone so immersed in their own little
world that they can't see the wood for the trees. The author probably thinks
he has put together a nice a little counter-attack to that "other" article;
but really he has just reinforced it.

~~~
timruffles
Actually Ruby and Java are both large languages compared to JS. Ruby
especially - compare its object system with Javascript's, or consider it has 3
flavours of lambda ;)

Nice to take 2 quotes out of context of their explanations.

And finally, I've written a heap of Ruby, Python & AS3 and enough Clojure,
Haskell and Go to be able to say: Javascript is a great little language. We
use it because of history, sure, but learn how to use it before bashing it.

p.s
[http://www.paulgraham.com/disagree.html](http://www.paulgraham.com/disagree.html)

~~~
nbevans
Are you the author?

The whole article just seems to be missing the point entirely.

It pretty much answers everything with "oh but you can write a hack to work
around that" or "oh there is some library you can use that plugs that gap".
Whilst yes, these may be viable "solutions" for hacking something out. It
doesn't refute the claim by the original article that JS is a bad language. It
actually just reinforces it with yet more examples.

The only positives to take away from the article are where it highlights
features coming in ES6 to _actually_ solve some of the problems. But these
admissions seem to contradict the premise of the article.

~~~
timruffles
Yes.

No I'm not missing the point: I show how, within a few lines, these 'missing
features' disappear. e.g: constants, type annotations, objects as keys.

Adding a whole language feature to save a few lines of code - not to my taste.
You don't need a new language feature to express an idea if it can be
trivially expressed in the language as it stands.

~~~
nbevans
I didn't like the constants solution for nulls. Why not use a Maybe monad? I'm
surprised that you didn't considering your claimed language experience.

I guess I just don't agree with your fundamental position on this. That
writing yet more code to workaround a bad language is in anyway a long-term
solution. At some point you'll want to bring more devs onto your team and then
you'll need to explain all this technical debt and hacks to them. Not good.

I still believe you're missing the point of the original article you were
refuting. It's not about being able to workaround something. It's about not
needing to workaround flaws in the language in the first place. That's what
defines a good language.

Further reading for you (unordered):

1\. [http://www.codinghorror.com/blog/2007/05/the-best-code-is-
no...](http://www.codinghorror.com/blog/2007/05/the-best-code-is-no-code-at-
all.html)

2\. "The line of code you don’t write is the line of code you never have to
debug." \-- Steve Jobs

3\. Mythical Man Month (a book)

~~~
timruffles
Maybe monad - like this one I wrote? [http://truffles.me.uk/playing-with-
es6-generators-to-make-a-...](http://truffles.me.uk/playing-with-
es6-generators-to-make-a-maybe-in-javascript). FYI - I'm sure you're not
trying to be, but you're coming off as terribly condescending...

Yes: we disagree. I write 3 lines where others see a need for new language
features.

------
sisk
"There is no need in this world for manual screwdrivers because a drill can do
the same job with less work."

I don't understand the vitriol. Is JavaScript perfect? No but I don't think
anyone has ever made that argument. Can you build web applications with it?
Absolutely.

The fact of the matter is JS can run on more "things" than anything else.
Period. This includes legacy systems. Don't like the language? That's totally
fine and, to an extent, understandable. But, holy shit, it's a highly
accessible tool: learn it and stop complaining.

"But there are better tools!" Ok, that's great, but those tools aren't
presently available in your toolbox. So write your own library to implement
missing feature x. Syntax not terse enough for you? Write a preprocessor.
Since you won't be the first, a lot of the hard work has already been done for
you. Consider publishing it. Do what every other developer doing anything on
the web has had to do for years: improve your sandbox.

"But these features should be standard!" They're not. Write the 3-5 lines to
fix it and move on. Want to go the extra mile? Talk to the folks who run the
show (the ecma folks).

Not happy with the tools? Fix them. Chromium and Firefox are OSS; write other
runtimes into them. Push for their adoption. Does that seem like an
insurmountable task? Then perhaps leverage what is available to you.

All of this religious debate is nonsense.

~~~
anon1385
_How does it not blow your mind that you can write one bit of code and have it
instantly available on the vast majority of devices released in the last 20+
years? Yeah, you 'll have to write polyfills and hacks, and there will be a
lot of boilerplate, but think about that for a second: one bit of code and it
runs on phones / tvs / computers / calculators / toasters. Do you have to
write it using a tool that was originally designed for a dramatically
different environment? Yup. Can you still do it? Yup. How is that not
amazing?_

C and even C++ run in far more places than Javascript does or ever will.
People using other languages won't be interested in or able to use your
library written in Javascript.

Anyway, I don't particularly care about writing code that runs on every device
ever. I want to write code to solve problems, and for a large set of problems
Javascript inside a web browser is fairly useless. Javascript is great if your
economic model is getting as many users as possible and then getting aquhired
before you run out of capital. This is the case for a lot of people on HN,
even if they don't realise it. However I'm a small time developer, not in SV,
who programs because I enjoy solving problems and helping people, not to get
rich. I'm only really interested in whether $(number of people who can run the
code) * $(how much they can pay) > $(my cost of living) so that I can afford
to eat. It means I don't care so long as the platform/language I choose has
enough users to pay my bills, it doesn't have to be 100% of people. I realise
that the industry giants at Google or Mozilla don't really care about people
like me ('life style business' is usually a term of derision on HN). In a
world of web based operating systems that only run web apps I would end up
stacking shelves in the supermarket or on the dole because I dislike that
technology stack enough that I can't be productive in it. That is why
sometimes I bitch about Javascript.

~~~
horyd
I don't understand how you connected Javascript with that particular start-up
mentality. "Solving problems and helping people" as a development approach is
platform agnostic; if you wanted to do that through the web then hey, you
would probably use Javascript to accomplish that.

~~~
anon1385
My point is that the benefit of Javascript (i.e. being able to run on all
consumer computers with (almost) a single code base) isn't a benefit that
interests me. I tried to explain why because I know that a lot of people on HN
have very different reasons for wanting to develop software -- people don't
apply to YC because they are building a small lifestyle business to support
their family.

>if you wanted to do that through the web then hey, you would probably use
Javascript to accomplish that.

Well personally I wouldn't since as I said I'd rather not develop software at
all then use Javascript/CSS/HTML.

Of course the rest of the industry has no obligation to continue supporting
the open native platforms that allow me to use the technologies I prefer.
However I don't think it is unreasonable to moan when I see those platforms
being killed.

------
Pxtl
I really don't get all this rage at Javascript. Obviously it has flaws and
warts, but I don't see it as being _significantly_ worse than other
dynamically-typed languages. Yes, there are some misfeatures we'd all like to
see ripped out and those provide some nasty gotchas. But once you learn the
language it compares well to Python and Lua and other dynamically-typed C-ish-
syntax languages.

------
chrismorgan
There's significant danger in the fact that people _don 't know that they need
to learn it_. They just write what they know, and techniques that are actually
supported across all browsers they're supporting (with IE8 or hopefully IE10
being the minimum supported browser) lie unused for quite a few years. That
these techniques _need_ deep knowledge to make a solid result indicates a
point of concern in the suitability of JavaScript for such things. Are ES5 and
ES6 merely papering over the problems where a fresh-room approach might work
better? (My answer: I frankly don't know. In the very long term, replacing
JavaScript might be a good thing, but it would wreak significant havoc for
quite a few years and would be impressively difficult to orchestrate from the
browser manufacturers' perspective.)

I'd still love to have the safety of a language like Rust for modern web
development. At some point, someone will fix Emscripten support up for it, so
then it'll be comparatively alright. (I like the theory of the one-language-
from-end-to-end approach, but I want it to be a safer language than
JavaScript.)

------
CountHackulus
Just saying that JS has a good debugger (it isn't that good, really) isn't
nearly enough to counteract the original points about terrible exception
handling. Exception handling isn't just about fixing errors, it's about
controlling the flow of errors through your programs and handling them as best
you can. Your customer doesn't want to step into a debugger to see what went
wrong, they just want a nice error message.

------
mariusz79
Web applications are only small part or "modern development", so no you don't
need to learn js. Unless you're working on a "cool, but ultimately useless"
web apps, JavaScript is useless.

~~~
timruffles
Context: the article is a reply to another post on the front-page:
[http://live.julik.nl/2013/05/javascript-is-
shit](http://live.julik.nl/2013/05/javascript-is-shit)

I probably should have titled it "Javascript isn't a shit language, you just
need to learn it" to avoid this ambiguity: I'm not claiming it's a "must
learn" for modern dev ;)

~~~
vezzy-fnord
Indeed, I was just about to say that this article was a mere rebuttal and
nowhere did it mention that you need to learn JS.

On the other hand, you're well on your way to becoming a successful marketer
with your deceptive titles.

~~~
timruffles
Unfortunately I'd have to have done it deliberately :) Here I just confused my
message: not a great marketing skill!

------
badman_ting
Javascript _is_ shitty, though. I say this as someone who loves it, enjoys
using it and understands it better than most. There are just some real
undeniable fuck-ups in the design of the language. Don't get all defensive
about it, be honest.

------
cygwin98
Stockholm syndrome? You have to use/write Javascript doesn't mean it isn't
bad.

------
Mikeb85
Great article. While JS isn't my favourite language, it has many redeeming
features. For one, to get started, just open up a browser console, and have at
it! No other language offers such a low barrier to entry. You can create a
simple HTML file, run it strait from the browser, and voilà, you have a
program.

Javascripts flexibility is why you see emulators, 3D games and simulations,
everything written in Javascript. Every language compiles to Javascript, and
you can edit code live in Javascript, having it render directly into the
browser, without running a server, REPL, etc...

The main advantage of Javascript though is the freedom it gives to developers
- you can be productive in it quickly, individual developers can get alot done
with it in a short time, and it enables web apps to be created quickly.

Look at something like Firefox OS, how easy it is to script and develop for,
and then you'll understand why JS is great.

~~~
romaniv
_For one, to get started, just open up a browser console, and have at it! No
other language offers such a low barrier to entry._

Languages do not "offer" browsers. Browsers offer languages.

 _Javascripts flexibility is why you see emulators, 3D games and simulations,
everything written in Javascript._

It's because people want to deploy to browsers and there are no alternatives.

 _Every language compiles to Javascript_

Any language can be compiled to any other language if someone spends enough
time on it. The reason people compile things to JavaScript is, again, because
there are no alternatives.

 _The main advantage of Javascript though is the freedom it gives to
developers_

This sounds like something from Ministry of Truth in 1984. We're stuck with a
single language, with no proper way to bypass it. The "alternatives" are ugly
hacks that still revolve around the same language, have most of the same
problems, then add some on top and make development tool-chains orders of
magnitude more complex. How on earth this is freedom?

~~~
Mikeb85
> Languages do no "offer" browsers. Browsers offer languages.

You misread? I said it offers a low barrier to entry. I'm well aware of
Javascript's relation to the browser, or Dart's in Dartium as a counter
example.

> It's because people want to deploy to browsers and there are no
> alternatives.

Flash? Java? C# (Silverlight)? Dart on Dartium? Native Client on Chrome? Some
have came and went, some aren't catching on.

> This sounds like something from Ministry of Truth in 1984. We're stuck with
> a single language, with no proper way to bypass it. The "alternatives" are
> ugly hacks that still revolve around the same language, have most of the
> same problems, then add some on top and make development tool-chains orders
> of magnitude more complex. How on earth this is freedom?

So propose an alternative... Native Client in every browser perhaps? I
wouldn't be opposed. Or is there another language you'd prefer? Dartium is
here, you can test it today.
[https://www.dartlang.org/tools/dartium/](https://www.dartlang.org/tools/dartium/)

> This sounds like something from Ministry of Truth in 1984.

Freedom, as in low barrier to entry and shipping an app. And certainly more
freedom than MS, Oracle or Apple offer with their solutions.

What platform makes distributing to users easier, and still free from
corporate control?

------
bayesianhorse
For me, javascript is not a brilliant language designed and descended from
heaven from God (or from Guido van Rossum), instead javascript is a political
plattform.

It is currently the platform which is able to spread over the biggest range of
devices because it evolved from an ongoing cooperation game.

This game isn't sane, it's not efficient and the result is a mess, but it's
our mess for the time being.

------
agentultra
I've yet to find a function, _better_ , which can apply even a partial
ordering on language designs.

A lot of the same arguments against Javascript are heaped on C as well. I
think anyone has used these languages long enough and understand them deeply
enough are more than aware of their short-comings. It hasn't stopped C
programmers from writing the software that runs pretty much the entire world.
Neither has it stopped Javascript programmers from making awesome things.

I think the argument that, _X is a crappy language because it lets you do
stupid things like Y_ , should be removed from the lexicon. I assume you've
all seen the video of the _wat_ talk and any Javascript programmer worth their
salt has committed it to memory. If they haven't then they're either still new
to the language or ignorant and could use some help. Maybe point them in Doug
Crockford's direction.

There's no perfect defence against human error. It's why we write tests,
static analyzers, linters and come up with practices like code review and
prayer (hah!).

------
romaniv
_‘Callback hell’ isn’t a problem for people who’ve written a lot of JS._

I get the feeling that people who say this _write_ a lot of JS, but don't
_read_ a lot of JS written by others.

------
drderidder
This was a really insightful response to a fairly typical neophyte language
rant. I run a popular JavaScript meetup group and see a lot of JS devs trying
to fit square pegs in round holes, struggling to make conceptual jumps from
synchronous, O-O programming to a functional, continuation passing style. They
gravitate to Promises or CoffeeScript, search endlessly for better control
flow libraries, and try to write their own frameworks to make JS work like
php/ruby/java, until eventually the light bulb goes on, and they get some of
the concepts this article hit on. Thanks for posting.

------
nachoplatter
"The built-in option to check an object’s ‘type’ is instanceof, which looks at
the function an object was created with."

Nitpick, because I happen to be teaching myself the Javascript class system
right now: _instanceof_ examines an object's prototype inheritance, not its
constructor. _x instanceof Y_ if _x_ inherits from _Y.prototype_ , so it's
possible to "sever" an object from its constructor by replacing the
constructor's prototype property. Coming from a strongly typed language, this
takes some getting used to!

------
patrickocoffeyo
Javascript is a tool. The fact that it runs in a browser and on a server means
that communication between the client and the server in a Javascript-based web
application becomes a lot simpler. If you know how to use the tool, it will
serve you well.

You can find things to gripe about in every language you'll ever work with.
Javascript is available. Use it and contribute to it's community, or don't.
Griping is not contributing. It doesn't solve any problems.

If you think Javascript could use improvement, write a library to help solve a
specific problem or contact emca and report your problem/issue/idea-for-
improvement.

Basically just stop complaining and start working. If you are of the opinion
that Javascript is a horrible language that is bound to make your project un-
maintainable and disgusting regardless of your expertise then choose a
different language.

Off to write come C :)

------
lampe3
To the Comments here: Why on HN is always so much hate? Because you don't like
Language X you have to say it in every post about it?

99% of the Comments are not about the Topic just about beliefs of other
Commenters....

~~~
CmonDev
I don't hate Java/Python/C#/C++ because I know I can realistically choose
between them when building server, desktop and mobile software. I hate
JavaScript because I am forced to use it for web clients. And transpilers are
useless because I can't really use my high-level GUI (QT, GWT, WPF etc.)
libraries. I spend enough time debugging raw JavaScript, I struggle to see how
putting something on top of it will ease the pain.

~~~
talles
That's, IMO, is another discussion. This JavaScript you talking about are
written by programmers that often don't know JavaScript well and uses it as a
little glue language on the client.

That's poorly written JavaScript.

On top of that, what I see missing on all this flamew.., err, discussion, is
the difference between a more loose, small and open language and a more
consistent, closed and regular one. Both feel a lot different. Comparing it in
a given scenario may be valid, comparing they without any context at all feels
like apples and oranges.

------
ksk
JS might be a great language in isolation, but modern development or modern
web development anyway.. in my experience wastes too many CPU cycles doing
stuff that native applications were doing with higher performance years ago on
some pentium 3..

Hopefully someone can solve the problem of distributing and updating native
apps as smoothly as web apps (or websites, to be more accurate) with a minimal
security impact and we can all go do some real 'modern' programming.

------
kevinSuttle
Regardless of technical quirks, if you don't know JS, you can't work on the
web. Period.

[https://www.quora.com/Computer-Science/What-is-the-most-
valu...](https://www.quora.com/Computer-Science/What-is-the-most-valuable-
computer-programming-language-to-know-for-the-future-of-technology-and-why)

------
thinkpad20
There are a few warts in javascript, but especially with "the good parts",
it's really not that bad. Besides, it allows and encourages a lot of
techniques which come from functional programming, which makes it a lot of fun
for a functional programming hobbyist like me :)

------
DmitryKoterov
How could one compare "exception handling" and "debugging"? They are two
differed things. JS exceptions handling IS weak by design, no matter what
debugger you are using. :)

------
CmonDev
ES6 is a 'future' development not 'modern' development language. It has not
been released yet and it is unknown when it will be fully implemented by all
mainstream browsers.

~~~
camus2
smells like ES4 fiasco to me. Ambitious spec stuck in endless debates.

I've heard it was supposed to be finalized in 2012,then 2013,then what ?

They should go with a minimal spec ( let,proxies,modules,promises,deferred )
and deliver.

------
rogerthis
I vote this because the post layout is much better to read (I doubt people are
going to understand my point).

