logoalt Hacker News

szmarczakyesterday at 10:25 PM1 replyview on HN

> human only looking at the indentation and not realizing the braces don't match.

If it ever gets to that point, a refactor is obligatory.

Don't give the human tools to make easy mistakes. Any grammar can be abused, so blame the human for not writing clean code.


Replies

TheOtherHobbesyesterday at 11:04 PM

Javascript's delimeter soup ((){([]{})}); can become near impossible to parse barebrained, especially when mixed with indents and semicolons.

Semicolons are just noise. They're absolutely redundant.

Some brackets are necessary, but whitespace/indent languages make it clear there's a lot of redundancy there too.

The goal is to minimise errors and cognitive load. The fewer characters the better.

show 1 reply