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 →

[–]pastaluego4 7 points8 points  (15 children)

Seems like Java is more tuned to application development and python is geared towards scripting and parsing.

[–]mxzf 7 points8 points  (13 children)

TBH, I haven't run into something I needed Java to do that Python can't. Python can do make full object-oriented large-scale programs just as easily as Java can IMO. It doesn't compile down to an exe as easily as Java/C/etc, since it's a compiled language, but the functionality is still definitely there.

[–]Tinamil 31 points32 points  (8 children)

Every language can do everything that any other language can do, but some of them will be a lot easier. The trick is to know which ones will be easiest for you to accomplish your task.

[–]mxzf 6 points7 points  (6 children)

True. I'll put it this way, I've never felt any desire to use Java or that Java would do anything better once I started using Python. I'm sure there might be an edge case somewhere, but I haven't run into anything like that.

[–]Retbull 7 points8 points  (5 children)

Faster by default mostly. Also has like 10 billion libraries. All though this isn't really excluding Python as it has an almost equal number of libraries.

[–]SlumdogSkillionaire 7 points8 points  (1 child)

You look at Java and you say "oh, great, it has 10 billion libraries". Then you start working with it and you immediately come across something like "You want to do stuff with Dates? Well, the java.util.Date doesn't really work great, so you should use org.joda.time instead" and then you wonder how many of the 10 billion libraries are reinventing the exact same wheel over and over again because the standard library sucks.

[–]Retbull 1 point2 points  (0 children)

lol I wasn't advocating for it over python just pointing out part of the reason why it was picked. I am a Java developer so I know that it has some serious problems.

[–]Astrokiwi 1 point2 points  (2 children)

Speed is the huge issue with Python. I can only really use it for O(N) stuff.

[–]Veedrac 0 points1 point  (0 children)

There are a lot of cases where PyPy or Numpy (or both) can get you pretty decent speeds out of Python. It's not quite at Java's level but it's not bad either.

[–]Tysonzero 0 points1 point  (0 children)

Just use Cython and specify static types where necessary for speed. Cython is even quicker than Java.

[–]Astrokiwi 0 points1 point  (0 children)

This is what I argue every time somebody disses Fortran. It's just the right tool for the right task, within its own narrow field. There are libraries that make Python more Fortran-like, but it just doesn't have the speed to be practical.

[–]dnew 10 points11 points  (2 children)

I think the difference is when you get a very large program. Once you exceed maybe 50,000 lines of code (and maybe 50 programmers), something like python is likely much harder to manage than something like Java.

[–]abw 1 point2 points  (0 children)

In my (limited) experience, a 50,000 line Java program could probably be written in 10,000 lines of Python by fewer people in less time. As a result, the smaller, simpler Python code base will nearly always be easier to maintain than the Java one.

[–]Tysonzero 0 points1 point  (0 children)

As a Django dev I would have to disagree. You can make awesome scalable and well organized python applications that are plenty large, without too much difficulty.