Sujet : Re: Joy of this, Joy of that
De : bowman (at) *nospam* montana.com (rbowman)
Groupes : comp.os.linux.miscDate : 24. Nov 2024, 06:01:30
Autres entêtes
Message-ID : <lqfq99F2ek8U1@mid.individual.net>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
User-Agent : Pan/0.149 (Bellevue; 4c157ba)
On Sat, 23 Nov 2024 23:48:59 +0000, Pancho wrote:
I'm actually quite unconvinced by Python.
For many things it provides a convenient level of abstraction if
performance isn't a major concern. It's not so much the language itself as
that the language has become very popular and the range of modules has
greatly expanded.
For example, the Esri Python API makes common GIS manipulations less
painful than using C++. Similarly if you're into machine learning while
TensorFlow and PyTorch have C++ bindings almost all tutorials will use
Python. In data science Python is starting to overtake R and is actually
faster for some operations. For REST APIs you have flask, django, and
several other frameworks.
For embedded work as Arm microprocessors have become the norm and SRAM has
greatly increased a Python interpreter, either MicroPython or
CircuitPython can be loaded on the device. Again you can work in C++ and
get greater speed and control but it comes at a cost. Controlling a servo
with PWM is easy in Python. Doing it in C++ means you need to determine
the slice and channel for the GPIO pin, decide what to load into the
counter to get the desired frequency from the 125 MHz clock,determine if
you need to use the divider for lower frequencies, and make other
decisions.
Using Python means you get uniformity across many disciplines and it's
good enough for most things. It could have been Perl if it hadn't gotten
stuck in the tar pits, or Ruby, or Go but from whatever twist of fate
occurred it was Python.