Thread: What's wrong with C++ as a first language?

  1. #16
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by abachler View Post
    C is an integral part of C++, you cant use C++ without using some C.

    if is C
    switch is C
    struct is C
    while is C
    int main() is C
    any function call that isnt into a member function of some class is C

    The member functions themselves are C, although they contain non-C code if they reference class objects.
    No, they are C++. Albeit C-style C++.
    The point is, however, that you should not learn C before C++.
    However, by learning C++, you will also learn of these elements it inherited from C. This is a good thing.
    However, learning C before will just make things worse once you learn C++, because they are basically different programming paradigms.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #17
    The larch
    Join Date
    May 2006
    Posts
    3,573
    What do you mean by purism, something like the real world example of converting Roman to Arabic on this page?
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  3. #18
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by anon View Post
    What do you mean by purism, something like the real world example of converting Roman to Arabic on this page?
    An application written entirely with classes. Everything is an object, there is little to no procedural programming present. You end up with hundreds of member functions each of which executes fewer than a half dozen functions, usually only 1 or 2. We had to throw an application away once because it was just faster and cheaper to rewrite it, although in that case I think it was intentionally obfuscated by a former employee.
    Last edited by abachler; 09-19-2009 at 10:57 AM.

  4. #19
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    C++ isn't all about "pure" OOP anyway. That's Java.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #20
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    There is nothing wrong with learning C++ as your first language. I learned DOS BASIC first but I would not call that OOP by any stretch of the imagination. VB is also not true OOP since MS tried to take a procedural language and turn it into OOP and ended up with a mess in the end.

    I would be willing to say that if C++ turns you off to programming then any other language eventually will as well. I would not recommend learning C first since when you make the transition to C++ you will have to change your mindset completely which isn't easy to do.

  6. #21
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by Elysia View Post
    C++ isn't all about "pure" OOP anyway. That's Java.
    I agree, which is why I think java programmers who try to program in C++ should be shot, buried, then dug up and shot again to make sure.

  7. #22
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I agree, which is why I think java programmers who try to program in C++ should be shot, buried, then dug up and shot again to make sure.
    Tell us how you really feel and don't hold back anything.

    I tend to agree, however, after working and talking with several Java programmers who are now using C++. The transition is not simple at all and a lot of Java-ish practices have to change to be efficient at C++. This is why I feel our uni's are ripping students off by removing C++ from the curriculum. It is very hard, nigh impossible, to find a C++ programmer right out of college these days. Most feel that since they know Java they somehow automatically know C++ -- which sounds good but unfortunately is not true.

  8. #23
    Ex scientia vera
    Join Date
    Sep 2007
    Posts
    477
    Quote Originally Posted by Bubba View Post
    Tell us how you really feel and don't hold back anything.

    I tend to agree, however, after working and talking with several Java programmers who are now using C++. The transition is not simple at all and a lot of Java-ish practices have to change to be efficient at C++. This is why I feel our uni's are ripping students off by removing C++ from the curriculum. It is very hard, nigh impossible, to find a C++ programmer right out of college these days. Most feel that since they know Java they somehow automatically know C++ -- which sounds good but unfortunately is not true.
    What about C# programmers going C++? Does the same thing happen there with bad practices? I have more experience in C# than I have in C++, but not much in either. I've only felt that C# has helped me understand OOP better, but I might be subconsciously using bad practices from it in C++ - or is Java better at ruining that for you than C#?
    "What's up, Doc?"
    "'Up' is a relative concept. It has no intrinsic value."

  9. #24
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    First of all, I just want to say that there is nothing at all wrong with learning C++ as a first language. It may be difficult to master every single aspect of the language, but by no means does that somehow make it unsuitable for beginners. The standard template library makes things easy, as well, since it frees the programmer from having to work directly with raw char* strings and arrays, and so writing bug-free code isn't really that difficult, right from the start. That said, there are certainly much 'easier' languages available to newcomers, but IMO, not nearly as rewarding (generally speaking, of course) as starting out with such a powerful language. Case in point, I've noticed that the transition from C++ to other languages tends to be much easier than vice versa. I do realize that it's a contentious subject, of course, so I just want to stress that such a conclusion is, quite naturally, highly subjective.

  10. #25
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Noone will ever master every aspect of C++ or any other language for that matter. I've been programming computers for nearly 30 years, and in C/C++ for 15, and there are still areas of the language that I have never had to use, let alone master.

  11. #26
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Quote Originally Posted by abachler
    Noone will ever master every aspect of C++ or any other language for that matter.

    I don't know - it took me about a hour and a half to master BASIC, and I'm pretty sure I didn't miss anything.

    Quote Originally Posted by abachler
    I've been programming computers for nearly 30 years, and in C/C++ for 15, and there are still areas of the language that I have never had to use, let alone master.

    You look too young to be 50, abachler. Unless you're saying you started programming when you were, like, 10.

  12. #27
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    Quote Originally Posted by Sebastiani View Post
    You look too young to be 50, abachler. Unless you're saying you started programming when you were, like, 10.
    Is starting at a rather young age really that hard to believe?
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  13. #28
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Quote Originally Posted by iMalc View Post
    Is starting at a rather young age really that hard to believe?
    Maybe not these days, but back in 1979 I think that would have been an exceptional case. In fact, the first PC I ever saw was like, back in 1983, and the owner had one simply because she was a chemist and needed it for work-related processing. And it wasn't at least another 10 years before I noticed anyone else having one. Hell, I didn't even own, much less know how to use, a computer until maybe '98 or '99! I was a bit behind, though.

  14. #29
    Ex scientia vera
    Join Date
    Sep 2007
    Posts
    477
    Quote Originally Posted by Sebastiani View Post
    Maybe not these days, but back in 1979 I think that would have been an exceptional case. In fact, the first PC I ever saw was like, back in 1983, and the owner had one simply because she was a chemist and needed it for work-related processing. And it wasn't at least another 10 years before I noticed anyone else having one. Hell, I didn't even own, much less know how to use, a computer until maybe '98 or '99! I was a bit behind, though.
    Holy ........ - I had actually tried programming by then. Started having fun with the scripts in the old game gone freeware, Dink Smallwood.
    "What's up, Doc?"
    "'Up' is a relative concept. It has no intrinsic value."

  15. #30
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by Sebastiani View Post
    I don't know - it took me about a hour and a half to master BASIC, and I'm pretty sure I didn't miss anything.
    Woot, i stand corrected... Commodore BASIC FTW!!!

    You look too young to be 50, abachler. Unless you're saying you started programming when you were, like, 10.
    Actually I was 9. I have a picture around here somewhere of me with my VIC-20, Ill have to dig it up.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 15
    Last Post: 08-09-2009, 11:20 AM
  2. The value of learning a new programming language
    By h3ro in forum General Discussions
    Replies: 21
    Last Post: 06-13-2009, 01:48 AM
  3. ASM to C language
    By TAZIN in forum C Programming
    Replies: 22
    Last Post: 06-03-2009, 06:29 AM
  4. God
    By datainjector in forum A Brief History of Cprogramming.com
    Replies: 746
    Last Post: 12-22-2002, 12:01 PM
  5. bubble sort in assembly language!!!!!!
    By lorenzohhh in forum C++ Programming
    Replies: 1
    Last Post: 04-15-2002, 08:30 PM

Tags for this Thread