Re:Why should I have written ZeroMQ in C, not C++ (2012)
by Koshkin on Wednesday December 12, 2018 @11:40PM
(#18669876)
I usually spend the compilation time staring at code, only to realize, somewhere in the middle, that I have to abort the build because I must make another change in a large and complicated template in header file that is included almost everywhere. At times, I do miss C, especially its classical variant, where you often didn't even have to include anything and instead could just write the declaration of something you needed - right next to where you need it...
[ Parent
| on HN ]
Re:Why should I have written ZeroMQ in C, not C++ (2012)
by maxlybbert on Thursday December 13, 2018 @01:01PM
(#18674466)
You can still use forward declarations. You can even use them in C++. But you have to be sure to get the signature exactly right (one of my favorite passages from “Design & Evolution of C++” involves Stroustrup’s discovery that a lot of programmers were cavalier about their forward declarations, e.g., using “...” as in any declaration where it would be syntactically valid).