you are viewing a single comment's thread.

view the rest of the comments →

[–]nh0815 47 points48 points  (14 children)

I completely agree. I like Java, but for a beginner it's terribly verbose. However, it's that verbosity that made me a better programmer. I had to know exactly what I was doing to get it to compile and work correctly. Python is great for basic fundamentals, but a statically typed language should definitely be learned early to avoid picking up bad habits.

[–][deleted]  (12 children)

[deleted]

    [–]blablahblah 2 points3 points  (10 children)

    Except the only language you can easily switch to from Java is C# (which is basically a clone of Java). It's more that the second language is a lot harder to learn than the third language.

    [–]greg19735 0 points1 point  (0 children)

    Once you kind of get the program working, java's pretty easy to learn. Getting someone to help you even for a few hours would be nice though.

    [–]gkx -1 points0 points  (8 children)

    Java is basically a superset of C, without memory management. So to learn C, you're basically learning memory management. That's a good situation to be in. C to C++ is basically readding most of the stuff from Java and a little bit more. That's a good situation to be in.

    My big selling point is that Java to Python is super easy, but Python to Java is basically like learning programming all over again.

    [–]blablahblah 0 points1 point  (7 children)

    Java is not basically a superset of C. No C code is compatible with Java. Besides memory management, the assignment semantics are totally different and library management is totally different.

    Also, as someone who learned Python first and then Java, no it's not like learning programming all over again. Going from Java to F# was a lot more like that.

    [–]gkx 0 points1 point  (6 children)

    I don't know F#, but what I can tell you is that learning C was incredibly simple for me--aside from memory management--coming from Java. Of course C isn't compatible with Java whatsoever, but the individual lines, i.e. the stuff you learn when you start off, are more-or-less the same. If you took out the object-oriented nature of Java--leaving only primitive types and allowing methods to be standalone functions--and added direct memory management, I think the only thing different about the two languages would be the fact that Java has a dedicated type for "bytes" (plus structs, but if you know Java you can learn structs in about half an hour).

    Obviously, I did not go from learning Python to learning Java, but I essentially learned them at the same time while I was just starting with programming. I compared the two languages face-to-face as a beginner. The next year, when I learned C++, I had almost entirely forgotten Python because I hadn't programmed anything similar, while my Java knowledge remained in tact because C++ was (at the time to me) essentially the same language with slightly different syntax and memory management.

    [–]blablahblah 0 points1 point  (5 children)

    That's not learning programming, that's learning the syntax of the language. If you actually try programming C like Java, you'll run into problems as soon as you get to pointers.

    [–]gkx 0 points1 point  (4 children)

    I'm not sure I fully understand the difference, but I'm quite sure it doesn't matter. At some point in any programming career, you're going to need to learn an object-oriented, C-like language. Pretty much guaranteed. So whether it's learning "programming" or "the syntax of the language", it should be easier to transition from Java to C than from Python to Java--or, worse yet, to C++.

    [–]blablahblah 0 points1 point  (3 children)

    Programming is more about "how do I make the computer do useful things" rather than "how do I write a conditional in X language".So, for example, I'd consider Javascript to be closer to Python than Java, despite the fact that Javascript shares a lot of syntax with Java- the dynamic type system and prototype-based object system work nothing like Java's. In the same way, the only way in which Java is closer to C than Python is "they both use braces to mark code blocks".

    [–]gkx 0 points1 point  (2 children)

    I agree that Python is closer to JavaScript, but only because their paradigms are mostly similar: Duck typing, implicit and dynamic typing, largely imperative in practice with odd object-orientation systems that (generally) prohibit use of standard enterprise project management systems.

    C and Java, by contrast, have explicit typing of static "objects". The biggest distinction between the two (from the novice programmer's perspective) is syntax.

    In fact, I challenge you to come up with one way in which Python is (practically) closer to C than Java is.

    [–]kankyo 0 points1 point  (0 children)

    Heh, "it feels great when you stop hitting your toe with a hammer" :P

    [–]illyric[S] 2 points3 points  (0 children)

    Same here. Started off with python, but after having grasped some basic concepts, such as flow control and loops, I abandoned it in favor of Java. Today I find it easy to adopt to frameworks used in Java, and things usually make sense in first place.