5 ms·
C is an excellent 2nd language. The language itself is obtuse, but the underlying model is fairly simple. C++ is a horrible one. These days, probably nobody sho
by vinceguidry 13y ago
C is an excellent 2nd language. The language itself is obtuse, but the underlying model is fairly simple. C++ is a horrible one. These days, probably nobody should learn C++ and should probably pick up Go instead.
As a teenager, I picked up a book on C++ having already learned BASIC, Pascal, and MS-DOS but never got proficient in it. I should have picked C. The "++" lead me to believe that it was a better language than C and I didn't have any real programmers around to tell me otherwise.
Oh the missed opportunities...
- YZF 13y agoC++ has many followers but it's a multi-headed beast and some of it can be much harder to grasp. I think it's easier to argue that it's better than C; all you need to do is to look at C code that tries to implement some patterns that are more naturally expressed in C++. Go isn't really a substitute for C++ but one might argue D is. Sounds like C++ and you didn't quite work out. I'd still encourage trying to figure out how some pieces of C++ can improve your C code and use those. You're welcome to stick to C in the rest of your code. A lot of "real programmers" do use C++ successfully and a lot of software you use has C++ in it's DNA... EDIT: (That said I would only expose new students to C++ after they've seen C and some higher level language so they can appreciate the niche that it fills)
- vinceguidry 13y agoWhoops, I didn't mean to give the impression that C++ guys weren't real programmers. Of course they are. I literally meant "real programmers" as in, anybody who had more experience than I did. I was completely self-taught. I will probably never touch C++ again. I solve all my problems with Ruby and if I ever need to go lower-level, I'll break out C and maybe Lua.
- yuushi 13y agoGo is not even close to being any kind of replacement for C++. Also, not all "real programmers" think that C is a better language than C++.
- vinceguidry 13y agoGo was very much designed with the intent of being a better C-replacement than C++[1]. As to whether it's an actual viable replacement or not, well, that really depends on how dependent you are on libraries. Back when I was getting into 'serious' coding, anybody with experience in both C and C++, whether they liked one or the other better, could have told me enough to make me realize I was better off learning C first. [1] http://www.drdobbs.com/open-source/interview-with-ken-thompson/229502480 http://www.drdobbs.com/open-source/interview-with-ken-thomps...
- pjmlp 13y ago> I didn't have any real programmers around to tell me otherwise. I am a real programmer, with almost 20 years experience. I'll take C++ over C without thinking twice about it.
- vinceguidry 13y agoI can count twenty (now) too, and I still won't touch it. By the time I was a teenager with that C++ book, I'd already been programming, whenever I could find hardware, and reading about programming for five or so years. I was kinda obsessed.