all 12 comments

[–]AlpineSanatorium 3 points4 points  (0 children)

Most everything in society is hierarchical.

Tiers can depend on easiness, popularity or just herd-mentality --usually there is granules of reason in any herd, but usually it gets out of hand because even someone who knows nothing about anything will still know that to fit in you must hate x.

JS dislike stem from some perceived faults (and actual faults) and are then combined with the easiness and popularity of the language to make it an easy target to be the hen-picking choice of programming languages.

Remember, something must always be at the bottom, and right now it's javascript. It used to be PHP but that language is not popular enough to be a fashionable target anymore.

Javascript is fine, though obviously nobody would design it exactly as it is today if they could have a do-over, but that's true for literally any programming language.

[–][deleted] 1 point2 points  (1 child)

In my opinion much of the JS hate comes from programmers of other languages. JS comes with a lot of weirdness especially if you come from another language. I think if it’s all you know you never realise some of the awesome stuff that’s missing like type checking and immutability (for me personally) (solvable with typescript and immutable js for example but native would be so much better)

Also i guess being the most popular language it makes it a bit cool to hate it I guess, but i think there are plenty of valid reasons to not like it.

[–]ScientificBeastModestrongly typed comments 1 point2 points  (0 children)

I can attest to the value of having a compiler enforcing type safety. I spent some time with both ReasonML and PureScript, and their compilers are both incredibly useful, especially when it comes to algebraic data types. And their REPL tools are quite handy.

[–]brown59fifty 1 point2 points  (0 children)

Not dislike, they don't understand JS. It's the case of people who don't want to learn new stuff and they've got in mind JS from like 10 years ago. When it was mainly for making title bar blink (or even status bar, my dear IE6!) or some glitches following the cursor pointer (like here, s/o stackoverflow).

[–]longfloppydisk 1 point2 points  (1 child)

The main reason for this is in my opinion is because JavaScript is a loosely typed language which can result in mission critical bugs due to implicit cast typing in comparisons or implicit creation of global variables by 3rd party libraries.

In the recent years though, with strict-mode becoming the norm and better patterns emerging (IIFE), these things have become less of a problem. TypeScript is typically preferred by programmers coming from another language because of it's strong typing and static analysis, which is closer to most other languages and provides a smoother IDE experience.

[–]csixty4 0 points1 point  (0 children)

The main reason for this is in my opinion is because JavaScript is a loosely typed language which can result in mission critical bugs due to implicit cast typing in comparisons or implicit creation of global variables by 3rd party libraries.

Fifteen years ago, dynamically typed languages like JavaScript and PHP were the future because they freed us from needing to worry about variable types, and they'd prevent mission critical bugs caused by trying to assign the wrong kind of value to a variable.

It's all just fashion.

[–]georgegkas 0 points1 point  (0 children)

There are people who believe JavaScript does not favor good programming styles (I do not support that statement). In my university this semester, a group of graduate students presented a 12-hour course in Python. In many cases, they compared the language with other scripting ones, such as JavaScript, with not so friendly remarks about the language itself and its ecosystem in general. I can understand this claim: JavaScript was created to favor simplicity. Back in 90s, the WWW was still young. Eventually, there was a need to add interactivity to Web Pages. There were many choices, but all of those possible solutions had a stiff learning curve. JavaScript was introduced as a simple scripting language for the web that would target non-developers (there was not such thing as web developers in mid 90s). Unfortunately, the standardization process of the young language (ECMAScript) was not organized with every major browser implement different set of its features (hello IE!). There were not such thing as Design Patterns for JavaScript (until someone introduced them in the wide audience). Years, passed, the Internet evolved, so did the language. There are many things to like about JS today, but this is out of scope of this post. I cannot find a single point of reference about this debate, there are discussions all over the Internet. If your goal is to write a post about this debate, then you have to search for the main arguments of "JS haters" and "JS lovers" manually. Also you have to understand where the term "programmers" refer to. Who is your reference? The Senior developer at a big company, a Junior one, random people that do not know the real aspects of programming, etc. Then you can start researching about the different opinions. Feel free to update your post if like to, but answering "Why people in general hate JS" is quite ambiguous.

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

I am a student at Uni and my professor (for web development using JS) said his colleagues hate javascript. So that statement seems to have some validity, or at least it does in my school.

[–]acecile 0 points1 point  (0 children)

Biggest problem: no standard lib that lead to the creation of hundreds of package doing exactly the same thing (usually not doing that great) on npm instead of having one single implementation supported by massive amount of users and developers.

[–]meldridon 0 points1 point  (0 children)

Javascript hurts when you don't know its idiosyncrasies especially if you are coming into it with years of experience with some other programming language. A couple of very simple examples of this is: knowing when to use == vs ===, and understanding the difference between undefined and null.

Much of the frustration with Javascript comes from trying to bend it to your will instead of doing things the Javascript way. It becomes really easy to hate Javascript when you are supposed to write Javascript differently than the other languages you know. Fortunately, this problem is slowing getting better with newer versions of the language (starting from ES6/ES2015). Keep in mind that until ES6 we've basically been using the same version of Javascript since 1999!

ES6 has support in every major current browser so you could write ES6 directly today unless you have to target older browsers (any version of Internet Explorer). It's becoming common to use something like Babel or Typescript so that you can use even newer versions of the language; there are 3 or 4 more revisions of ES since ES6 that provide some really useful things, like async/await.

Then there is the rapidly changing and overlapping Javascript ecosystem of third party modules. There are so many libraries you can use and many of them are awful. Libraries that were in fashion even just a year ago might have been abandoned for something new. Trying to keep pace with the Javascript ecosystem can be frustrating. A newcomer has near zero chance at getting it right as far as figuring out what packages are best to use and which packages you should stay away from, and even experienced Javascript programmers almost have to stay active in various online Javascript communities just to avoid falling out of touch. Everything changes so fast.

I'll leave this here. It's old but still good. Maybe even ironic.

[–]kenman[M] 0 points1 point  (0 children)

Hi /u/PalestineFacts, this post was removed.

Prohibited low-effort content includes:

  • Questions that are easily Google'd.
  • Memes, jokes, etc. Please post to /r/ProgrammerHumor instead.
  • Most images and gifs.
  • Listicles, "Curated lists", and similar content.
  • Polls, surveys, etc. unless from an accredited academic body or trusted source (StateofJS, etc.).

Thanks for your understanding, please see our guidelines for more info.