It's like the castle in the Holy Grail:
When I first came here, this was all swamp. Everyone said I was daft
to build a castle on a swamp, but I built in all the same, just to
show them. It sank into the swamp. So I built a second one. That
sank into the swamp. So I built a third. That burned down, fell
over, then sank into the swamp. But the fourth one stayed up.
And that's what you're going to get, Lad, the strongest castle in
all of England.* implicit conversions, which you can get rid of at compile time using TypeScript or Flow.
* lack of explicit ints and ints with more than 31 bits (JITs can give you SMIs, or 31 bit integers for things they can prove are always integer values)
And thats about it.
Javascript is fine if you don't use Javascript.
> lack of explicit ints and ints with more than 31 bits
Javascript is fine, except where it's garbage.
I don't really have a problem with javascript. I just don't want to build anything of any real complexity with it.
In ruby, blocks are like lambdas except when they are not, and you can pass a block explicitly or yield to the first block implicitly. But there are also lambdas, which are different. Modules are again uselessly global, and cannot be parameterised over other modules (without resorting to meta programming). Oh yeah they are also another syntactical and semantical concept. Why not just `Module.new`? And there are classes, with private variables, which are prefixed with @.
The above examples are just scratching the surface
So yeah, I'm tired of people claiming that JS has the same amount of quirks as PHP. Boo hoo, its so horrible: no large ints, and implicit conversions. Compared to that, Ruby, PHP or (god forbid) Perl < 6 are total disasters. Pre-ES6, JS had the greatest power-to-number-of-concepts ratio of all current mainstream dynamic languages (1). With just prototypes, closures and objects, it manages to provide features that other languages do not with a dozen of base concepts
(1) cheating a bit here, because you could argue that Lisp or Lua are mainstream enough.
Also, I can't help but wonder how this: http://docs.python-guide.org/en/latest/dev/virtualenvs/ is somehow better compared to npm...
"We rewrote this from JS to Python."
"Guys but JS is better than PHP and Ruby!"
Still cant see how is that relevant.
"We rewrote this from JS to Python!"
"They did this because JS is so horrible, its cancer!"
"Uhh, actually, JS is not significantly worse. It does well when compared with typical mainstream dynamic languages"
I think its worth debunking this supposed "cancerness" of JavaScript and the importance of the cited-to-death superficial "wat" talk on implicit conversions, by providing some perspective on where JavaScript's quirkiness actually lies on the popular dynamic languages spectrum.
Maybe then we will be able to have an actual discussion on the pros and cons of the language choice (like runtime availability, and the fact that package managers don't know what the heck to do with node and npm's sandboxed-by-default modules), instead of the middlebrow "its all just JS insanity" dismissals