4 ms·
C++ is legitamately gross to read these days, unless you sit there reading it every day. The syntax has become so ridiciously complicated, I have developed an
by jonny383 6y ago
C++ is legitamately gross to read these days, unless you sit there reading it every day.
The syntax has become so ridiciously complicated, I have developed an involuntary gag relfex every time I read any kind of "modern" C++ code (i.e. heavy use of templates / generics / keywords).
- camccar 6y agoI like it. After working in golang for a while I miss more robust languages that can express themselves in complicated and creative ways. I hate makefiles though.
- glouwbug 6y agoNew projects using C++20's module system will greatly ease the pain of makefiles.
- dgellow 6y agoI spent the past 3 years working professionally with Go, and while I enjoy it for $WORK it can also feel limiting in the way you expressed. I found out about D recently, and it seems to be a quite nice compromise between C++ and Go, giving you more way to express yourselves without having the pitfalls of C++. Maybe something you would be interested into: http://dlang.org/ http://dlang.org/.
- gumby 6y agoI'm not sure what you mean by heavy use of keywords, but C++20 allows you to express templates basically as generics so if the <> syntax offends you you can do without it completely. Do you also object to Lisp Macros?
- jonny383 6y agoThis is exactly the problem with C++. Let's fix ugly syntax by providing yet another way to write something that accomplishes the same thing. Over-evolution isn't a good thing.
- pjmlp 6y agoJust like breaking backwards compatibility usually leads to 17 years delay in adoption. Can't please everyone.
- teleforce 6y agoNot OP but D has better templates implementation [1] and it has no macros, yeay! [1]https://github.com/PhilippeSigaud/D-templates-tutorial https://github.com/PhilippeSigaud/D-templates-tutorial
- gumby 6y agoTemplates were an attempt to get macros into the language.
- chubot 6y agoWhat bugs me is that you don't even need to use templates to run into syntax traps. Braced initialization is crazy and I don't understand it (having first touched C++ sometime in the 90's, done it professionally, and even writing in my own pidgin subset now) https://twitter.com/timur_audio/status/1119160309573242880?lang=en https://twitter.com/timur_audio/status/1119160309573242880?l... I can understand having crazy syntax for rare and exotic things. But variable initialization is not one of those things...
- kllrnohj 6y ago> Braced initialization is crazy and I don't understand it It's a disambiguation thing: https://en.wikipedia.org/wiki/Most_vexing_parse https://en.wikipedia.org/wiki/Most_vexing_parse The simple recommendation is to just always use {} when you want to construct an object, see https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es23-prefer-the--initializer-syntax https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines...
- mehrdadn 6y agoThis "problem" has been there in C++ like forever, it's not new.