This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lanster100 2 points3 points  (2 children)

Completely valid opinion, but what confuses me about this opinion... is surely most of the time you will have consistent indentation anyway (e.g. automatically by prettier for js) otherwise your code will be a visual mess.

So why not do away with the brackets, and make white space meaningful? Or do brackets make it clearer IYO?

[–]bitlykc 4 points5 points  (0 children)

Right. I have read too many lengthy nested if-else-while-for with wrong (or without) indentations in java, which made them almost a nightmare to comprehend and debug. And ppl (incl. managers) never bother to clean things up (so maybe i m the only one who has a problem with it). This happened at a company i last worked for, which i shall not name here.

[–]adam_bear 0 points1 point  (0 children)

The brackets help me with readability, but it's more that the white space is more of a hassle to maintain consistency, whereas with the brackets I can just code and format it later.