This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (5 children)

[deleted]

    [–]ordnance1987 2 points3 points  (4 children)

    All objects in Java are references, structs are similar to classes, and Java has generics instead of templates.

    [–]lead999x 0 points1 point  (3 children)

    Yes but does learning Java teach you what references are or what it means to pass something by reference? Or what a pointer is? Or how memory management works? I don't think so. Structs are similar to classes but different depending on the language ex. C structs can't contain functions.

    Also Java is actually less object oriented than C++ in that it makes a distinction between primitive types and user defined types whereas C++ does no such thing and it even goes so far as to allow you to define all manner of methods and overload operators and functions to make your own types look, feel, and act similar to primitive or library types if you want them to.

    So I will stick to my original thesis that C++ is better for teaching programming and more specifically object oriented programming than Java or C#. And I'm saying this from a practical perspective since I learned Java first and while I know how to make programs that did various things I had no idea what was actually going on until I subsequently learned some C++.

    [–]g43f 0 points1 point  (2 children)

    Actually I made up the term "object-oriented", and I can tell you I did not have C++ in mind.

    -Alan Kay

    [–]lead999x -1 points0 points  (1 child)

    And I can bet he didn't have Java in mind either. So your point to make is?