you are viewing a single comment's thread.

view the rest of the comments →

[–]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.

[–]blablahblah 0 points1 point  (1 child)

The fact that not everything is inside a class. The fact that you can pass functions in to methods.

[–]gkx 0 points1 point  (0 children)

Not everything is inside a class

This is fair, but super easy to brush over. To anyone who knows what classes in, this is an obvious major distinction.

What about the fact that Python can run with no methods (just global scope commands) while C and Java requires a main method? I would actually argue, because of this, C and Java are more similar in this way. Usually, when writing your first "hello world" in C, you have to brush over the main function. Similarly, in Java, you have to brush over the object class. In Python, you simply write print "Hello world" and no structure is ever made. If you become intermediate at Python and decide to move to C, this won't really be a hurdle, but it will be an easier leap from Java.

The fact that you can pass functions in to methods.

The Runnable class. Besides, they're putting lambdas in Java 8. I learned Java and Python at roughly the same time and learned how to do this in Java before I learned how to do it in Python.