4 ms·
That is an interesting reason. It may seem small, but I think it is a perfectly valid point. I'm of the opposite opinion, but for similar reasons. I type usi
by innocentoldguy 10y ago
That is an interesting reason. It may seem small, but I think it is a perfectly valid point.
I'm of the opposite opinion, but for similar reasons. I type using the Dvorak layout, and typing curly braces is a bigger pain in the nipple than typing "end." For me, "end" also makes reading code blocks easier, because it looks like the end of a paragraph. In other words, the fact that it does read like a sentence makes it stand out more for me than curly-braces do; especially when coders, who obviously have no style, put the opening curly-brace on the same line as the function definition or control loop. Hehe.
I think it is interesting to contemplate the subjective aspects of languages and syntax preferences. Probably not productive, but interesting none the less.
- pmontra 10y agoSpeaking of subjectivity, if (condition) { ... } is the only readable option :-) if (condition) { ... } drowns the code in a sea of (subjective) noise. There are many other variants https://en.wikipedia.org/wiki/Indent_style#Placement_of_braces https://en.wikipedia.org/wiki/Indent_style#Placement_of_brac... and wars have been fought over them. There are pros and cons for most of them. My tradeoff is the K&R style. I think editors can automatically convert among styles nowadays. The only thing that matters is consistency.