3 ms·
I agree, this is just a rant on C++. Coming from Java world, I can tell that it is nice being able to raise exceptions from the constructor. However, switchin
by vz0 14y ago
I agree, this is just a rant on C++.
Coming from Java world, I can tell that it is nice being able to raise exceptions from the constructor.
However, switching from C++ to C is absurd. C++ is (mostly) a super set of C. Whatever you want to do in C, in C++ is also possible.
If there are some C++ features (exceptions, classes, contructors, etc.) that are making his coding task more complicated, he should simply stop using those features and refactor his code.
- ufo 14y agoThere is one advantage to writing in plain ANSI C and it is that you get it to compile and run on anything.
- antidoh 14y agoI wouldn't say absurd. Certainly you can use C functions in C++. But if you want to eliminate the use of most or all C++-only features, the only way to guarantee that is to not use C++. White or blacklists can be circumvented, intentionally or inadvertently.