3 ms·
What's wrong with it is that it's really really easy to make a mistake and introduce a subtle bug that will be hard to spot. Especially now since languages lik
by moccachino 8y ago
What's wrong with it is that it's really really easy to make a mistake and introduce a subtle bug that will be hard to spot.
Especially now since languages like python have been developed that have made people used to indentation-defined code.
It's the style in K&R? Ok, so the literal inventor of the language was certain he wouldn't make this kind of mistake, that still doesn't mean I trust myself not to.
- neatcoder 8y agoOmitting braces for single statements is quite idiomatic in the C development world, whether we like it or not. If we don't trust ourselves that we wouldn't make this kind of mistake, use the right tooling: 'gcc -Wall' (since GCC 6) or 'clang-format' can easily detect misleading indentation.