Learning C

Started by
27 comments, last by Serapth 12 years, 9 months ago
In regards to the first question, no, starting with C is not a good idea. The libraries are laughably bad, you need to do things that are just horrifically primitive by modern language standards ( manaully null terminating strings? ). Frankly too, C is more or less obsolete, outside of embedded systems and a few other niche markets.

I agree most of the standard C library is annoyingly cumbersome to work with, but when I suggested starting with C I did so because the syntax of the language is (for the most part) a subset of C++ and relatively easy to approach. I am quite sure you will agree that learning C++ is easier if you already know C.

First off, the majority of C++ houses these days don't even roll their own engines anymore, it's just a piss poor use of time.

True, but that's because they do it for the money; not for the challenge.
Advertisement

I am quite sure you will agree that learning C++ is easier if you already know C.


In my experience a lot of people who come to C++ from a C background tend to see it as "C++ = C + classes" and are rather horrible C++ programmers with a lot of baggage they need to get rid off before they can improve (if they have the self-reflection ability necessary to make that journey).
In my experience a lot of people who come to C++ from a C background tend to see it as "C++ = C + classes" and are rather horrible C++ programmers with a lot of baggage they need to get rid off before they can improve (if they have the self-reflection ability necessary to make that journey).

I see you point, but you have to draw a thick line between C veteran programmers and people who from the beginning are only planning to learn sufficiently enough about C to move on to C++.
I do not agree. As soon as you are under the impression that C++ is just C with a few extra bits glued on you are on a very bad path.

I am quite sure you will agree that learning C++ is easier if you already know C.

Yes, if you know C you'll find it easier to start learning C++. However, if you don't know C, I wouldn't recommend starting there to learn C++.

The "hard parts" that are really at the core of both languages (mostly the pervasive assumption that the programmer is correct) are hard regardless of the route taken. There is also the idiomatic differences between the languages, one would spend lots of time having to unlearn C idioms to really allow modern C++ idioms to be useful.

Personally I believe that the way you write programs in two languages has become different enough to make learning C++ by first learning C a harder position to suggest than in times past.

I do not agree. As soon as you are under the impression that C++ is just C with a few extra bits glued on you are on a very bad path.



This is true now, but frankly if you were programming when C++ started, it was much less true. In the initial days, C++ really was just C with a few extra bits glued on. Hell, it still compiled down to C in those first days. Then as the language evolved, they grew more and more apart. Now, I agree with you completely, learning C then C++ now really sets you down the road of a number of bad habits, but it wasn't always this way.


As a corollary, if I could go back in time and talk to my future self, I would say learn LISP first ( or F# or something similar if starting out today ). Procedural programming really warps you way of thinking and these days functional programming ( of which LISP was the posterboy ) is really coming to the fore but my mind really really really struggles with it. In using C# it is extremely powerful, but my brain really has to work overtime to do or even read functional code.

[quote name='BitMaster' timestamp='1310479633' post='4834299']
I do not agree. As soon as you are under the impression that C++ is just C with a few extra bits glued on you are on a very bad path.



This is true now, but frankly if you were programming when C++ started, it was much less true. In the initial days, C++ really was just C with a few extra bits glued on. Hell, it still compiled down to C in those first days. [...]
[/quote]

That is true, but I was under the impression we were talking about how to learn C++ nowadays and not working on a "if I had a time machine to tell myself..." scenario (which would be better placed in the lounge). ;)
Yes, if you know C you'll find it easier to start learning C++. However, if you don't know C, I wouldn't recommend starting there to learn C++.

The "hard parts" that are really at the core of both languages (mostly the pervasive assumption that the programmer is correct) are hard regardless of the route taken. There is also the idiomatic differences between the languages, one would spend lots of time having to unlearn C idioms to really allow modern C++ idioms to be useful.

Perhaps you are right. However, I had personally been using C(99) exclusively for 8 years before I began using C++ and my experience when I swapped was that it had a lot of the features I had been missing in C. Nevertheless, and likely because I had already gotten used to thinking very 'module-oriented' when designing programs in C, the actual paradigm shift from functional/imperative to object-oriented wasn't honestly very hard.

[quote name='Serapth' timestamp='1310480555' post='4834307']
[quote name='BitMaster' timestamp='1310479633' post='4834299']
I do not agree. As soon as you are under the impression that C++ is just C with a few extra bits glued on you are on a very bad path.



This is true now, but frankly if you were programming when C++ started, it was much less true. In the initial days, C++ really was just C with a few extra bits glued on. Hell, it still compiled down to C in those first days. [...]
[/quote]

That is true, but I was under the impression we were talking about how to learn C++ nowadays and not working on a "if I had a time machine to tell myself..." scenario (which would be better placed in the lounge). ;)
[/quote]


Hey, allow an old man his senile musings! :)
Hey guys. I'm 23 years old and i want to develop games. I believe i'm too old for make a bad choice. So what should it be the one ? C++?

This topic is closed to new replies.

Advertisement