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

I like lua better because its minimalist. Javascript feels like a kitchen sink language.

Otoh, missing ++, +=, ..= operators really bothers me.

But that's just personal taste, not objective by any means.



Yeah. I think if I were to pick one reason, it would be Lua is "minimalist". But, like I wrote, maybe, it too, would have just had lots of stuff added onto it if it had been in the browser. Hard to say.

I love ++, but you know what? I was shocked when a co-worker pointed out that it is frowned upon to use ++ in javascript. It some big companies, their linter settings mark ++ as something that should be changed.

https://eslint.org/docs/latest/rules/no-plusplus


Lol, i suppose there is no accounting for taste, but the justification for that rule is really something.

Appearently its really confusing if you put a bunch of newlines between the ++ operator and its ophand. No kidding.


The origin of this rule was that Douglas Crockford doesn't like ++.

From JavaScript: The Good Parts (May 2008):

> The ++ (increment) and -- (decrement) operators have been known to contribute to bad code by encouraging excessive trickiness. They are second only to faulty architecture in enabling viruses and other security menaces. The JSLint option plusplus allows the use of these operators.

Needless to say, I'm with you and hackthemack on this.




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

Search: