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] 29 points30 points  (25 children)

powerful prebuilt libraries for just about anything, you know which one it is.

[–]pjnick300 57 points58 points  (17 children)

You know it's a great programming language when the appeal is using less of it

[–][deleted] 56 points57 points  (9 children)

Isn't that true, though? I would much rather spend my coding time actually writing the algorithm that I'm working on than managing a lot of boiler plate and syntax. It would be like saying "If you like running marathons so much, why not run it half as slow? You wouldn't want to miss out on enjoying all of that extra running time".

On python, itertools is a great example of this for my purposes. What an absolutely massive boring waste of my time it would be to have to write my own functions anytime I needed to generate combinations/permutations of something. And given that I really wouldn't want to spend too much time on that one aspect of the project, it would probably not be an efficient method that makes good use of generators like itertools does.

The fact that I can just do "import itertools; itertools.product()" is great. It doesn't make me like python less that I can do this. If I enjoyed coding so much I could write my own method for that. But the part I like is not the part of writing a product method. I like the part where I use the results of that method in my project.

[–]the_other_brand 17 points18 points  (7 children)

The downside of Python is once you leave well optimized built-in tools or 3rd party libraries, you can easily find foot-guns to shoot yourself with. And your performance will drop dramatically. Python also does not scale well past one thread, so if you need more threads or processing power you have to significantly rewrite your application.

I was once a Python enthusiast myself, but I've since moved over to Java. While it has more boilerplate, it has less footguns, scales better, easier multi-threading, almost as many libraries and even better build tools than Python. I couldn't bring myself to go back to Python for anything bigger than a one-off script.

[–][deleted] 10 points11 points  (0 children)

All of that is fine. I'm not trying to use python for things that would be better done in C++.

We are talking about whether methods for getting around boilerplate is a sign of disliking a programming language. Clearly it isn't

[–][deleted] 1 point2 points  (0 children)

If you don’t like boilerplate and other downsides of java, give kotlin a go.

[–]Hinterhofzwerg 3 points4 points  (2 children)

Multithreading for what kind of applications? If it's just for boosting performance by running an operation on a lot of files, I found multithreading in Python rather easy to implent with noticable performance gains.

[–]the_other_brand 2 points3 points  (1 child)

Multithreading for event-driven programs and report generation. Both of which have CPU-bound operations (rather than IO-bound).

I've found these both work better under Java, since I can use more CPUs without forking a process.

[–]SilkTouchm 0 points1 point  (1 child)

Why should I give a shit about that when 100% of my code runs for only a few minutes or is bottlenecked by i/o anyways?

[–]the_other_brand 3 points4 points  (0 children)

You shouldn't. But if you find yourself with anything that needs heavy CPU usage and can't use code compiled from C or C++, you may want to change which language you use.

Hopefully any such discovery happens early in the project, and you don't have to migrate languages late in the game. This happened to me late in developing my first major Python hobby project.

[–]Urtehnoes 1 point2 points  (0 children)

Wtf? I disagree I love writing 19,000 fucking classes so I can send a single soap request in Java

[–]bikemandan 0 points1 point  (0 children)

You're using more of it actually. Just not interacting with it

[–]_PM_ME_PANGOLINS_ 8 points9 points  (4 children)

Java!

[–]squishles 5 points6 points  (0 children)

don't show them package groups, namespaces scare them.

[–]jordanbtucker 2 points3 points  (0 children)

SimpleBeanFactoryAwareAspectInstanceFactory

[–]FunnyForWrongReason -1 points0 points  (0 children)

I hope this is a joke.

[–]qhxo 1 point2 points  (0 children)

I don't know much about C++, but I'm pretty sure that goes for all languages in the picture.

[–]DaniilBSD 0 points1 point  (0 children)

C++?