[LAU] OT: C or C++?

fons at kokkinizita.net fons at kokkinizita.net
Wed Oct 13 22:55:13 UTC 2010


On Wed, Oct 13, 2010 at 11:11:41PM +0100, Folderol wrote:

> > First learn C. Make sure you go to the bottom of it.
> > Then learn C++, and select what's useful for you and what isn't.
> > 
> > Ciao,
> > 
> Glad to know I made the right decision!
> 
> // Still prevaricating with pointers and struggling with structures :(

Pointers: make sure you understand them so well that you will love them.
Structures: make sure you understand them very well. C++ objects are
just structures with some functions added.

If this sounds strange, this is the background:

- C is very close to what happens in hardware, i.e. to what you
  processor will be doing. It helps *a lot* to understand things
  at that level, even if later you will want to use more abstract
  views. It's a good idea to get some familiarity with a 'clean'
  processor e.g. the ARM - you will understand that a lot of what
  it is doing directly maps to pointers.

- The C++ world hates pointers and tries to deny their existence
  by all means, one of them being the concept of 'references'.
  Which are just pointers in disguise, and the disguise doesn't
  help to understand them. Nor does their inconsistent syntax.

Good luck !

-- 
FA

There are three of them, and Alleline.



More information about the Linux-audio-user mailing list