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

I think you forgot the analogy. Why is it bad to have semicolons in programs then?

> You become keenly aware of the fact that 90% of your mental effort is going not towards actually solving the problem at hand, but appeasing the compiler or conforming to some stupid syntax rule that exists for no reason other than that someone at some time in the dim and distant past thought it might be a good idea, and were almost certainly wrong.

You said this originally. I definitely agree for something like parentheses in if conditions in Java, but I think semicolons are a great example of how

> having something to indicate the boundaries between words and sentences has actual value and reduces cognitive load.



> Why is it bad to have semicolons in programs then?

It's not bad to have them, it's bad to require them when they aren't necessary. It's bad to make their absence be a fatal syntax error when they aren't necessary. (Some times they are necessary, but that's the exception in contemporary languages.)

Also, I know I'm the one who brought them up, but semicolons are just one small example of a much bigger and more widespread problem. It's a mistake to fixate on semicolons.




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

Search: