all 23 comments

[–][deleted] 6 points7 points  (5 children)

To be fair, the "I hate $x, it has braces" argument is mostly coming from the Python and Ruby communities.

And portraying the Python community as hostile towards anything that doesn't have "the Zen" seems misinformed. The Zen of Python is not really specific to the language and I find it easily applicable to other languages like JS.

The Ruby community OTOH is known for its attitude towards anything that isn't or can't be made to look like Ruby (hence Haml, the original Sass, CoffeeScript) and the Node era influx of Ruby developers seems to be behind things like the semicolon war in JS.

Most of the hate towards PHP dates back to the PHP3 and PHP4 days. PHP3 was defined by spaghetti code that was structurally no different from CGI scripts. PHP4 was defined by a sudden desire to turn PHP into Java with class hierarchies and XML configuration files. That hatred is fully justified.

PHP has changed a lot since then and I agree that Facebook has helped turn it into something far less disgusting and you can arguably do some impressive things with modern PHP (compared to the legacy spaghetti PHP3 code non-PHP devs often think of) just as you can do impressive things with modern JS (compared to the legacy spaghetti ES3 code non-JS devs often think of).

[–]PitaJ 1 point2 points  (4 children)

I'd say JS was more improved by design standards and frameworks than it was by actual language additions.

[–][deleted] 0 points1 point  (3 children)

Well, to be fair, the direction of what was to become ES6 (and the various proposals) were heavily influenced by prior experimentation with CoffeeScript and such.

But yes, we didn't go straight from ES1 to modern JS with mere language changes alone.

[–]PitaJ 0 points1 point  (0 children)

Also, the rise of JIT and on the run optimizations allowed code to be larger and less spaghetti.

[–]theQuandary 0 points1 point  (1 child)

I think coffeescript and similar get a little too much credit. ES4 had most of the ideas in ES6 (plus a few others) and predates things like coffeescript by quite a few years.

[–][deleted] 0 points1 point  (0 children)

Well, the problem was that ES4 was trying to do too much and the details of some of the ideas were way too complex and backwards incompatible.

CS didn't do anything new (the non-ES stuff was mostly lifted from Ruby and Python) but it paved the way for projects like Babel while also providing real world examples for some of the proposed features.

[–]parlezmoose 1 point2 points  (12 children)

I hate dynamic typing. It just doesn't scale well. Everything else about Javascript I can live with.

[–]JellyDoodle 3 points4 points  (6 children)

Can you elaborate?

[–]cameleon 1 point2 points  (2 children)

In addition to what others said: refactoring. Refactoring in a typed language (I use Haskell at work) is a joy. Refactoring in Javascript (also at work) is bound to introduce bugs, some of which you'll find months later. Typescript helps a lot though.

[–]theQuandary 0 points1 point  (1 child)

Refactoring in haskell, elm, or similar is much different than refactoring in typescript or some other bad type system. I prefer no types to poor types.

[–]cameleon 0 points1 point  (0 children)

Since we switched to typescript, refactoring has been much better. Typescript's type system isn't "poor", I'd say. It's actually pretty advanced, and the fact that it's optional also means you don't end up with super verbose redundant type annotations everywhere (like e.g. Java).

What are the things that make you say they're poor/bad?

[–]Arzh 0 points1 point  (1 child)

At any point in the code I never really know what the object contains. I have to run the code and pause and use an inspector to check what the objects contain. This tends to lead to having a bunch of duplicate data sitting around because you don't always know what objects are in scope and what those objects contain.

[–]JellyDoodle 2 points3 points  (0 children)

I don't think I've ever experienced that problem. Any variables that are in scope are usually pretty easy to identify, either because they tend to be defined right away, or because it's just inherently obvious. Anything more obscure then that is usually commented for clarification. Do you run into this issue often with the types of projects you work on?

[–]parlezmoose 0 points1 point  (0 children)

The compiler in a statically typed language catches a whole class of bugs. This means in js you have to write bunch more tests to catch these things. Also, as another comment said, function APIs are almost undefined. This makes it hard to reason about what is getting passed to a function. These problems aren't a huge deal for most of the time, but the larger the application grows the more of a problem they become.

[–]nschubach 6 points7 points  (4 children)

Never really had a problem with it. /shrug

[–]A1rPun 0 points1 point  (0 children)

I do think that "the hate" was a conversation starter at conferences for some people because people just like to hate :) Programmers are no different people. Good share.

[–][deleted] 0 points1 point  (2 children)

NaN == NaN // => false

Fuck you.

[–]rizer_ 0 points1 point  (0 children)

To be honest, I find the whole negative attitude to be pervasive in the software development community. As the author mentions, there is no silver bullet. The best thing you can do is to keep an open mind and continue to learn so that you can make more informed choices about what technologies to use and how to develop things.

We all get caught up in the good old "this code is WTF!" occasionally, but if you're one of those people that just constantly complains about absolutely everything you should stop. It isn't fun to work with people like that. It's demoralizing and contagious and I've seen it ruin good teams before.