Thread: C vs. C++
View Single Post
Old 08-25-2010, 07:23 AM   #5

Crosma's Avatar
Exclamation Re: C vs. C++
The main argument from my point of view is that C++ only offers abstraction of things that you can already do in C, without being any simpler to code or understand. Creating new objects is like using malloc() and deleting them is like using free(). Objects are just structs with member functions, but you can achieve the same results by passing struct pointers. Function overloading is somewhat possible in C (see printf()), but I consider it to be bad practice anyway.

Inheritance, abstraction, encapsulation, and polymorphism are kind of cool, but you can achieve similar results by using struct pointers (and I suspect that's all they're doing at a lower level).

C keeps you in the loop. You can see exactly how your data is structured and how and what is being passed where. It's all about keeping the control firmly in the programmer's hands.
(define love (lambda () (map conquer all)))
Crosma is offline