News for hackers. Stuff that matters.
Re:JavaScript Is Weird by nicoburns on Monday June 28, 2021 @05:58AM (#27659834)
The vast majority of these are implicit type coercion issues. Which is fairly easily banned with a linter. Once you've done that, I think JavaScript is probably the nicest of the big dynamic scripting languages (Perl, PHP, Python, Ruby) to work with.

There could definitely be improvements, but trash seems to be taking things too far.

Re:JavaScript Is Weird by ehnto on Monday June 28, 2021 @08:47AM (#27661199)
The article only really touches on weird language caveats, but where JS really gets weird is it's ecosystem. If you are working with JS in a commercial capacity you will eventually find dependency hell, arbitrary toolchain complexity, asynchronous and callback mind bending, transpiling and compilation, and all just to render some HTML. Quick, get your compsci degree bobby, we need to make this button go to another page!
Re:JavaScript Is Weird by pansa2 on Monday June 28, 2021 @06:15AM (#27659930)
> I think JavaScript is probably the nicest of the big dynamic scripting languages (Perl, PHP, Python, Ruby) to work with.

As an experienced Python programmer learning JavaScript, this isn’t true for me yet but I hope it becomes true. I think JS will be much more useful to me than Python.

> Which is fairly easily banned with a linter.

Any particular recommendations?

Re:JavaScript Is Weird by furstenheim on Monday June 28, 2021 @06:19AM (#27659959)
Eslint is the default linter. Standard is a curated list of rules with good quality.

https://github.com/standard/eslint-config-standard

I would start with that and tweak what you don't like

Re:JavaScript Is Weird by dfabulich on Monday June 28, 2021 @06:19AM (#27659961)
> Any particular recommendations?

TypeScript.