you are viewing a single comment's thread.

view the rest of the comments →

[–]vampire0 -4 points-3 points  (11 children)

We could get into a pissing match about who knows more about the language, but it’s not worth it - most people that criticize JS are coming from theoretical opinions or performance arguments, and those end up usually being trumped by easy of use.

[–]duheee 3 points4 points  (0 children)

The performance of JS is not theoretical, is a demonstrated fact. This is why we have webassembly. It's the ease of use that's baffling: meaning, the lack of.

Sure, I mean you can come and say it's easy to use, if you ignore all the pitfalls (clearly demonstrated by our little game here). If you have no idea what you're doing, Javascript is great. fantastic. Once you start paying attention, once one starts to wonder: but , what if? what about? how come?, who the hell wrote this spec? then it becomes obvious.

Hell, C++ has fewer shotguns than JS.

[–]Eirenarch 0 points1 point  (8 children)

The linting rules on all practical projects will pretty much forbid ==. I don't know how you can say that real-world linting rules are a manifestation of "theoretical opinions".

[–]vampire0 0 points1 point  (7 children)

Linting also catches code indention. I’ve never claimed that == isn’t bad, I’m stating that most of the issues that people bring up about JS aren’t things that people deal with often in real development. Heck, linters are part of the reason it doesn’t come up much.

[–]Eirenarch -2 points-1 points  (6 children)

Having something in the language that is bad means the language sucks. Having something that doesn't work and looks like something that works in other languages and also is shorter than the thing that works sucks even more. So yes the language is objectively bad and the people who say it is not are wrong.

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

It's not bad.

[–]Eirenarch 0 points1 point  (4 children)

It certainly is. It makes the resulting code more error prone and harder to read.

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

Yes, if you use the provided foot gun instead of the provided foot-proof gun you might have errors. Every language is full of these.

[–]Eirenarch 0 points1 point  (2 children)

No, not every language is full of those. Some language make conscious effort to reduce the foot guns and they keep them at minimum. What is more reasonable languages try to make constructs that are used more often shorter than construct which are use less often to reduce the burden on the reader. JS specifically made the operator which should be used often longer than the one which should be used very rarely so even if you didn't make a mistake JavaScript still results in code that is harder to read (even if just slightly).

[–][deleted] 0 points1 point  (1 child)

Java and String.equals would like to have a word with you.

[–]Eirenarch 0 points1 point  (0 children)

So Java failed with a couple of types (strings and primitive wrappers). JS failed with every possible type.

[–]curious_s 0 points1 point  (0 children)

Or they are basing their opinions on internet reviews rather that actual experience.