3 ms·
(I still think it's outrageous that C is still a single-pass language - we shouldn't need separate simultaneous declaration and definitions any more) Maybe not
by tjoff 9y ago
(I still think it's outrageous that C is still a single-pass language - we shouldn't need separate simultaneous declaration and definitions any more)
Maybe not, but I have a hard time to believe that it can be considered even a slight annoyance to anyone but people just learning how to program. The same people that are annoyed by it probably benefits from it anyway, forces them to actually think about what they are doing.
Also makes it easier to get an overview of the code using just a text editor. KISS.
- coldtea 9y ago>Maybe not, but I have a hard time to believe that it can be considered even a slight annoyance to anyone but people just learning how to program. Slight annoyances pile up. Ergonomics matter even for seasoned pros. Just because they have learned to ignore the garbage, doesn't mean their room is clean.
- tjoff 9y agoTrue, but this truly is a non-issue.
- dTal 9y agoSeems like status quo bias. If C did not have this wart, no one would suggest adding it just to "force beginners to think about what they are doing" or "make it easier to get an overview of the code using a text editor". And human factors matter. In the context of language design, they're the only things that matter - the entire function of a programming language is to make a complicated task fit a human brain as neatly as possible.
- tjoff 9y agono one would suggest adding it Disagree.