3 ms·
Yep, that's pretty weird. It harks back to the early days of C. When I first saw the currently recommended form: int main(int argc, char **argv) { //
by lutusp 13y ago
Yep, that's pretty weird. It harks back to the early days of C. When I first saw the currently recommended form:
int main(int argc, char **argv) {
//body..
}
I thought it was nice but not obviously advantageous, but over the years I've come around to thinking it makes code easier to follow. Even many bash shell scripting guides now recommend a similar form:
for x in y; do
# body
done
- foxhill 13y agoit certainly helps when your function isn't as simple as main..!