4 ms·
C programmer here; I don't like C++ much because every library tends to reinvent the whole stack (or maybe that's just my impression from using MFC and Qt, whic
by _pmf_ 10y ago
C programmer here; I don't like C++ much because every library tends to reinvent the whole stack (or maybe that's just my impression from using MFC and Qt, which are notorious in that regard).
RAII and scope based construction/destruction is actually quite nice.
- humanrebar 10y ago> every library tends to reinvent the whole stack This is a problem with vocabulary types. C tends to do a good job of providing them. C++ tends not to, though there has been some progress in the standard lately in defining classes like unique_ptr and string_view. C tends to fall down by providing raw memory (an int and a char) to represent fairly subtle relationships (the int represents the size of the string pointed to by the char... what happens when the int is negative?). So C libraries don't 'reinvent the whole stack', but this sort of bookkeeping logic tends to cause bugs (at least security bugs).
- mayhew 10y agoAt least C++ has a stack to re-invent. With C you're missing Vector and Map before you even start.
- zenshin 10y agoCheck out the Juce library. It's a fantastic lib, primarily intended for audio programming but I've found the GUI tools to be very nice.