DEV Community

Discussion on: Do you think Python is overrated ?

Collapse
 
tandrieu profile image
Thibaut Andrieu

Well, that's the problem. When talking about a language, you don't talk about only the language, but all its ecosystem, its libraries, its package manager, its interop, etc...
WebGL is base on vendor's OpenGL implementation, which in the end are written in C. Does this means OpenGL is not a Javascript library ?
Some part of OpenCV C++ are written in CUDA. Does this means C++ is not fast because it uses CUDA libraries ?

Développer est maintenant plus proche de coller des briques ensemble que d'écrire un algorithme pur en utilisant uniquement le langage.

Thread Thread
 
cicirello profile image
Vincent A. Cicirello

CUDA is a C/C++ interface enabling utilizing GPUs. It isn't a general purpose language that can be compared to C++. It is complimentary to C++, enabling utilizing hardware that you couldn't otherwise directly use. It is the GPU that is speeding things up in that case and not an alternative language.

In the case of numpy or scipy (both great libraries that I regularly use), the speed advantage comes because those libraries are native C implementations. The Python modules are just wrappers. If they were implemented directly in Python, they would be slow by comparison.

One of the advantages to Python is the combination of (a) it is relatively straightforward to provide a Python interface to C, and (b) its relatively simpler syntax, etc compared to other languages. This is likely why it has been so widely adopted in data science and scientific applications. All of the computationally intense stuff is actually implemented and compiled natively in C. The data scientists, etc, can then use these as needed from Python with its simpler syntax.