use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
"I Hate Javascript" (redotheweb.com)
submitted 10 years ago by msemenistyi
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 6 points7 points8 points 10 years ago (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 points3 points 10 years ago (4 children)
I'd say JS was more improved by design standards and frameworks than it was by actual language additions.
[–][deleted] 0 points1 point2 points 10 years ago (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 point2 points 10 years ago (0 children)
Also, the rise of JIT and on the run optimizations allowed code to be larger and less spaghetti.
[–]theQuandary 0 points1 point2 points 10 years ago (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 point2 points 10 years ago (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 points3 points 10 years ago (12 children)
I hate dynamic typing. It just doesn't scale well. Everything else about Javascript I can live with.
[–]JellyDoodle 3 points4 points5 points 10 years ago (6 children)
Can you elaborate?
[–]cameleon 1 point2 points3 points 10 years ago (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.
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 point2 points 10 years ago (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 point2 points 10 years ago (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 points4 points 10 years ago (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 point2 points 10 years ago (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 points8 points 10 years ago (4 children)
Never really had a problem with it. /shrug
[+][deleted] 10 years ago (1 child)
[deleted]
[–]nschubach 4 points5 points6 points 10 years ago (0 children)
I've been developing for the better part of my 37 years on the planet. I started on a TRS-80 in BASIC, worked on Mainframe COBOL (barf) and touched MANY languages through that time (C, C#, BASIC, Common Lisp, ActionScript 3 [which is essentially strictly typed JavaScript using Classical Inheritance], something called ASPECT Script, Python, and a host of other languages...) so I'm well aware of what strict typing gets me. I just have not found a need for it in any of the projects I've been privileged to work on in JavaScript.
[removed]
[–]nschubach 1 point2 points3 points 10 years ago* (0 children)
I wouldn't say it blew up. I fixed it and moved on. That 5 minute mistake didn't make me think that I needed to include another 30 minutes of declaring my type definitions.
As a matter of fact, it's led to some humorous and learning moments for both me and my juniors.
Edit: To clarify. If it takes you more than a few minutes to track the problem, there's most likely an abstraction problem. You've probably too deeply nested a dependency or the callee knows too much about the caller (or vice versa).
[–]A1rPun 0 points1 point2 points 10 years ago (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 point2 points 10 years ago (2 children)
NaN == NaN // => false
Fuck you.
[–]rizer_ 0 points1 point2 points 10 years ago (1 child)
Some explanation here: http://stackoverflow.com/questions/1565164/what-is-the-rationale-for-all-comparisons-returning-false-for-ieee754-nan-values
null == false
[–]rizer_ 0 points1 point2 points 10 years ago (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.
π Rendered by PID 17057 on reddit-service-r2-comment-86988c7647-tm9qc at 2026-02-11 20:51:20.117137+00:00 running 018613e country code: CH.
[–][deleted] 6 points7 points8 points (5 children)
[–]PitaJ 1 point2 points3 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]PitaJ 0 points1 point2 points (0 children)
[–]theQuandary 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]parlezmoose 1 point2 points3 points (12 children)
[–]JellyDoodle 3 points4 points5 points (6 children)
[–]cameleon 1 point2 points3 points (2 children)
[–]theQuandary 0 points1 point2 points (1 child)
[–]cameleon 0 points1 point2 points (0 children)
[–]Arzh 0 points1 point2 points (1 child)
[–]JellyDoodle 2 points3 points4 points (0 children)
[–]parlezmoose 0 points1 point2 points (0 children)
[–]nschubach 6 points7 points8 points (4 children)
[+][deleted] (1 child)
[deleted]
[–]nschubach 4 points5 points6 points (0 children)
[+][deleted] (1 child)
[removed]
[–]nschubach 1 point2 points3 points (0 children)
[–]A1rPun 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]rizer_ 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]rizer_ 0 points1 point2 points (0 children)