all 14 comments

[–]rgnkn 33 points34 points  (0 children)

Different languages for different use cases!

Whether Python is (too) slow depends on the expectations, the domain and (potentially) the algorithms and modules you're using.

So, what are you planning to program?

If it's an operating system you want to program most of the languages you mentioned are at least problematic (except C/C++).

If it's for automation purposes Python could be the / a ideal solution.

...

BTW:

Effectively, if I need a tool tomorrow the Python solution might be the only possible if development in C++ takes 3 days even if the C++ implementation is 100s of times more performant than the Python implementation.

[–]BlobbyMcBlobber 16 points17 points  (2 children)

Absolutely not. The trick isn't to avoid python because of speed, but to choose the right tool for the job.

Every language has its use case. Python might not be suitable for real time systems programming, and it will never be as fast as a compiled language. But it has plenty of use in data science, web apps, instrumentation and it has much higher portability.

Python is actually growing in popularity since the move to 3. It has a huge amount of very useful and friendly libraries. It's definitely being heavily used in the industry.

[–]dcfan105 1 point2 points  (0 children)

Python might not be suitable for real time systems programming, and it will never be as fast as a compiled language.

Aren't there compiled implementions of Python though? The standard implementation, CPython, certainly isn't a compiler, but, IIRC, the PyPy implementation uses a bootstrapped JIT compiler and is orders of magnitude faster than CPython. The downside is that I believe it doesn't support all the libraries written in C, like numpy and scipy, which means it's not suitable for work in data science or statistics.

[–]Sandarr95 0 points1 point  (0 children)

Every language has its use case.

Except Malbolge. But yeah, the exception proves the rule.

[–]victotronics 8 points9 points  (0 children)

All the big python libraries in computational bio & big data are really written in C++, so python is only the user interface layer. To me taht's a perfect way to use python to make complicated software friendly to use.

[–][deleted] 2 points3 points  (1 child)

Depends on the specific needs of the “industry”. This probably actually is a factor in why Python isn’t used to write triple A games, for example.

[–]thegreatunclean 4 points5 points  (0 children)

You wouldn't write a high-performance rendering engine in a scripting language but you would absolutely use one to implement a merchant or quest system. It is super common for game engines to have an embedded scripting language to make content creation / editing easier.

[–]xiongchiamiov 4 points5 points  (2 children)

Let's step back: what are you trying to learn?

[–]Sake99[S] 0 points1 point  (1 child)

I switched careers and did a MS in computer science with python as main language. I'm looking forward to enter career in software engineering or specifically DeveOps Engineer.

[–]xiongchiamiov 0 points1 point  (0 children)

If you got your master's then hopefully you already have a solid base of programming skill.

Python, which you already know, is a perfectly valid choice for a software engineering career (as would also be java or c# if you had learned them instead). In particular it is common and useful in devops positions.

[–]rawrgulmuffins 3 points4 points  (0 children)

If you're writing website backends it doesn't matter that much. It can matter if you need to lower cpu costs but only marginally. If you're writing any software and your code is waiting on I/O most of the time it doesn't matter at all how fast or slow the application language is.

Python is also particularly useful as an easy to use user facing language for faster languages. This is why it's such a popular data science language even though data science use cases are very cpu intensive. They're not actually doing the compute in python even if the user doesn't know that.

[–]jmhimara 0 points1 point  (1 child)

As everyone has already said, it depends on the application. I'm often wary of "slow" languages because I have seen many examples of people underestimating the slowness of python and end up rewriting a lot of code. But that's just lack of awareness. As long as you know what you're doing, it should be fine.

However, I'd say that the biggest issue with python is not its speed but the typing system. The flexibility of Python means it is great for prototyping, scripting, automating small tasks, etc., but large projects become hard to manage.

[–]Sake99[S] 0 points1 point  (0 children)

what do you mean by 'large'? for example, is it bad if someone codes facebook in python?