3 ms·
>That's an issue you run into once, set your editor, and then never have to worry about it again. HN needs /. style comment ratings for things like this. You
by papsosouid 14y ago
>That's an issue you run into once, set your editor, and then never have to worry about it again.
HN needs /. style comment ratings for things like this. You deserve your "+1 funny" for that.
>curly braces will plague you as long as you use C-inspired languages
Curly braces don't cause (potentially hard to find) errors like mixed invisible indentation does. You can't be "plagued" by them at all, they are harmless. And they even let your code be completely unambiguous so you can use tools to reformat your code as you please/need.
- deleted 14y ago[deleted]
- qu4z-2 14y agoMuch as I like the /. "semantic rating" system, I'm glad HN doesn't have it, so we don't get these sorts of passive-aggressive ratings. Regarding your second point, curly braces do cause potentially hard-to-find errors, specifically when the indentation and the curly braces don't match up. Admittedly it's very easy to get into a set of habits where you don't do that, but the same can be said for the mixed indentation issue.
- papsosouid 14y agoExcept that there is no potential for ambiguity, so tools can easily highlight indentation that doesn't match braces as an error for you, and tools like "indent" can automatically indent the code correctly based on the braces.
- qu4z-2 14y agoBut those are both ways to keep your two different notations for structure in sync. If you only have one structure, you don't have that problem in the first place.