Edit, sorry, shoulda read your whole commebt before replying
Edit, sorry, shoulda read your whole commebt before replying
This issue is no worse that having multiple different variables that look the same and only in their obscure same-looking unicode symbols.
A linter can handle this. As can a decent font, or editor settings.
How?
if(some condition)
do something; {
do something else;
}
do another thing;
You can stretch 'some condition' out over multiple lines and have some more parents inside of it, to make it more confusing.See also https://softwareengineering.stackexchange.com/a/16530
Yes
I class that as a bug in the original C specification
That would be Python. I do not like it, which does not mean it is bad, it is a matter of taste
The alternative is you say "blocks are delimited by {}"
`if(foo) bar` should be invalid
`if(foo){bar}` is OK by me. Worik's tick of approval
(Neither is valid C I think)
Not necessarily. In practice, in C-as-actually-used people (should) set up linters and formatters, so that you can rely on indentation.
When programming, this means that you can behave as if both curly braces and indentation are significant, and you get an error when they are out-of-sync.
Like what? As you note, mixing tabs and spaces is now an error.
I've never understood the objection to semantic whitespace. Complaining about having to indent code correctly strikes me as being akin to complaining about having to pee in the toilet instead of the bathtub.
Bonus, if there's a good reason to change the linter format, you can do so. Rust handles this rather well I think.