4 ms·
To be clear I wasn't making the "noisy" critique myself, it's just a qualifier I've seen, in my opinion unfairly, applied to the syntax of certain languages in
by simias 6y ago
To be clear I wasn't making the "noisy" critique myself, it's just a qualifier I've seen, in my opinion unfairly, applied to the syntax of certain languages in the past.
I think the problem is not whether the language is really noisy or not, it's more whether the language is familiar or not. Nobody complains that "(x + 1) / (y * 4)" is noisy, even though it's more symbols than numbers or letters. Everybody is familiar with mathematical notation.
I think deep down a lot of the "noisy" complaints are really about unfamiliarity, and that was my point: most coders aren't familiar with Smalltalk but most coders are familiar with C-style syntax, so it wins by default in the marketability department.
It's a bit like when people who are first exposed to Lisp say "oh my god all these parens!" or when Python-first coders have to code in C and say "wow, I can't believe I have to put semicolons everywhere". Yet when one is familiar with these languages the parens/semicolon kind of fade away because you see the structure behind the tokens, so to speak. I don't even consciously notice semicolons anymore, and I type them without thinking as naturally as I hit "return" at the end of a line. But if you're just starting it does take a while to get used to them.
- neutronicus 6y agoThe 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?