2 ms·
I am mostly writing audio applications where I need maximum performance because the time budget is extremely limited (usually 1.45 ms to compute the whole audio
by spacechild1 6y ago
I am mostly writing audio applications where I need maximum performance because the time budget is extremely limited (usually 1.45 ms to compute the whole audio graph). I'm working on Pure Data, which is written in C89, but my own projects are all C++. Things which make C++ much more pleasant than C:
* RAII
* lambdas
* templates
* function overloading
* operator overloading (used judiciously)
* inheritance and interfaces (used judiciously)
* an extensive standard library
* exceptions (depends on the project)
For me, the advantages of C++ over C are obvious and IMO there's no reason to use C except for legacy projects or platforms which don't have a C++ compiler.
Of course, C++ has lots of warts and things to complain about, but OP asked for the positive things :-)
- pjmlp 6y agoMany of those features were already available in Turbo C++ for MS-DOS back in 1993, hence why I never liked C and only wrote straight C code when required to deliver projects in various contexts written in C.