3 ms·
The one thought about C++ Lisp completely ruined for me is giving closing braces their own line. Why do all my functions have to end with six newlines?!!??
by neutronicus 6y ago
The one thought about C++ Lisp completely ruined for me is giving closing braces their own line. Why do all my functions have to end with six newlines?!!??
- saagarjha 6y agoGenerally in C++ you shouldn't be nested your code so that you'd need six lines just for your brackets.
- neutronicus 6y agoIn code I control, I agree. If you're working in an early-return-hostile codebase it gets difficult, though.
- kazinator 6y agoThey don't. There is a workable style for C and C++ (and other "C-likes") which looks like this: int main(void) { int ch; while ((ch = getchar() != EOF) { putchar(ch); } if (ferror(stdin)) { return EXIT_FAILURE; } else { return 0; } }
- neutronicus 6y agoOh, man, do you have a .clang-format or, better yet, emacs C-style that implements this?