3 ms·
Why do you call it "thinking in C" as opposed to structural code? So you like thinking in terms of ststically sized arrays? C++ has proper arrays since C++11. N
by AstralStorm 9y ago
Why do you call it "thinking in C" as opposed to structural code?
So you like thinking in terms of ststically sized arrays? C++ has proper arrays since C++11.
Nobody can help you if you like malloc, but using shared_ptr and unique_ptr gets close enough.
Nothing prevents quitting structural code in C++. Or even functional for that matter. (Though function objects are not quite light yet.)
There are even safe subsets where at most you will get an exception when you try to do something dirty. Easy to enforce.
Certain things like compile time calculation (being enhanced by the moment) do not even reasonably exist in C or for that matter Nim.
The about one gripe with C++ is ABI or rather lack thereof. Three other is the amount of legacy code written in C or outdated dialects of C++.