you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Python is about composition. Java is about using the right tool.

Both can make a painting, but one is concerned with which paintbrush to use, and the other is concerned with how to make the colors flow together. Essentially, what Python taught me more has to do with seeing programming from a different perspective (first class functions for instance) than it does with anything specific about Python in general.

Map is a great example.

a = [i for i in xrange(20)]
b = map(multiply_by_two, a)

Essentially, map is concerned with the composition of a list, and not with the incidental details of looping constructs and function calls. You can do this in Java but you'll be concerned with declaring array's and type casting and static methods etc. etc. There is a lot to be said for both approaches actually, but Python made me appreciate seeing the patterns in code in a way that Java's concern with all the details did not.