Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Flexible !== awful


I'd say about half the interactions this relies on fall in the 'trash' category. It doesn't mean javascript is trash, but it has a lot of trash in it.


I noticed that you had to use !== instead of != because the comparison operators in JavaScript are awful :D


Touché :)

Though I'd still argue that the presence of both `==`/`!=` and `===`/`!==` is somewhat more indicative of flexibility than awfulness.


JavaScript can certainly be awesome, but the tricks that JSFuck relies on aren't "flexible". They're things that make you say "Wat?"

https://www.destroyallsoftware.com/talks/wat


If your code adds two arrays together, there's something seriously wrong with your code. It isn't that different from divide by zero error.


A lot of other languages allow + to concatenate lists/arrays/sequences, even merge dicts/objects/maps. Languages that don’t have those semantics often have much safer and more idiomatic ways to join data structures (see lisps of all sorts) in ways you wouldn’t immediately expect if you’re coming from this perspective.

Adding two arrays together isn’t the problem, it’s a perfectly obvious thing to do. Adding two arrays together and getting a new language out of it is bonkers.

Edit to add: I work in JS/TS almost exclusively. This isn’t a chip on my shoulder criticizing a language I’m not invested in.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: