3 ms·
Well that is kind of the point -- you know C and C++ reasonably well and are comfortable with the syntax, so of course you think it is easy to read. If you wer
by betterunix2 6y ago
Well that is kind of the point -- you know C and C++ reasonably well and are comfortable with the syntax, so of course you think it is easy to read. If you were as familiar with Lisp you would not find it hard to read either (I should know, since I am comfortable with both C++ and Common Lisp).
That said, if you want a real C++ readability challenge, here you go:
int add_one(int x) { return x+1; }
Easy-to-miss undefined behavior is a much greater readability problem than the specific syntax of a language in my opinion.
- MaxBarraclough 6y agoI agree that UB is a serious issue in languages like C and C++. I thought you were going in another direction with that example, the Most Vexing Parse. https://en.wikipedia.org/wiki/Most_vexing_parse https://en.wikipedia.org/wiki/Most_vexing_parse