logoalt Hacker News

Gormotoday at 12:47 PM1 replyview on HN

There's an important form/function distinction here, though. Indentation is useful for human readability, but braces function to give unambiguous direction to the compiler or interpreter. I think conflating these two different purposes together is a mistake: you shouldn't risk altering or breaking the logic flow of a program simply by adjusting its visual formatting.

The fact that we use whitespace for layout is precisely why it's a bad idea to assign it semantic value. I'm a fan of both braces and semicolons for that reason.


Replies

Wowfunhappytoday at 1:04 PM

I think this is probably correct for an experienced programmer but incorrect for someone who is new.

show 1 reply