I have such mixed feelings about python
-
honey the codewitch wrote:
I'm guessing that's probably why it's so popular with the AI crowd.
I had a workmate showing me all these cool things you could do with Python and AI, and especially Machine Learning. It could all be broken down into different ways of calling a library, written in C.
Wrong is evil and must be defeated. - Jeff Ello
"All these cool things you could do with Python" is very rarely because of the language itself, but due to the ecosystem built around it. A similar ecosystem built around any other language or platform would be just as cool ... in principle. From a technical viewpoint. But the psychology of identity is super-essential here. A Python package is for us, we the Python community. Let those C++ and C# and VB and Fortran guys do their own, if they like - that's none of our business. We could try to build a similar ecosystem around dotNET, with the same spirit surrounding an assembly well rivaling PyPi in size and variation, available to all dotNET languages. But what sort of identity and unifying community is that? I think it is far from realistic creating anything close to the same enthusiasm around dotNET, without that focusing point that is The One Unifying Language that we all speak in our code. There is nothing in the Python language as such that makes it more suitable. What is does or does not offer in programming mechanisms isn't essential. But its function as a beacon to lead you into safe waters of a cool ecosystem is.
-
all true. my main issues with scripting are these: 1. Usually because of duck typing and lack of full compilation and such errors can be harder to track down. 2. In terms of performance it is so often hard to know exactly what is going to cause the performance issues, or worse, sometimes there isn't a reasonable way around it. That's fine, when scripting is used here and there in moderation, but it's a different story when you're powering an entire application with it.
Real programmers use butterflies
I find Python's type hints to be very useful in my own code. As you mentioned, they aren't checked when Python compiles your source into bytecode. But good tooling catches errors pretty quickly. Pycharm does a good job of screaming at me if I do anything that violates my type-annotated Python code. As for performance, it depends on what you're doing. Most of Instagram's UI is still data from a Django app, so big Python apps running at massive scale can work if you're careful. Might not work as well for other types of applications, though.
-
Having to use a language aware editor so that it doesn't actually destroy your code is a huge red flag in terms of language design, IMO. Significant whitespace has no place in language grammars. It's poor design. The proof is in the confusion and other problems it generates, like literally invisible syntax/"compilation" errors in source code.
Real programmers use butterflies
-
It gives the users the power to say "We rule! We don't give an elephant about anyone else - we are in our own world were WE are masters, doing things OUR way! We give you POWER!" Forget about interfacing to other languages. Forget about common libraries for arbitrary languages. Forget about other ways of distributed updated software. Established ways of installing software. We do everything The Python Way! That feeling of power, independence from any non-Python dictate, is quite essential. Python people feel that they are masters of the world. That is, their closed Python world. And that is enough for a whole lot of them.
:thumbsup: Interesting, imho, I witness, have witnessed, similar "fervor" with other languages/tools. Back in the early 80's ... I am an antique ... I would run into proponents of the FORTH language who were "evangelical" about it to the point of being "missionaries." After my rehab from a brief infatuation with LISP, I went on to BASIC, Logo, finally PostScript, and C#. I remain convinced that spreadsheets + macros (particularly after VBA macros came along) really did enable a lot of intelligent people get productive.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
-
Notepad++ enables us to clearly differentiate spaces from tabs.
So does UltraEdit, when you activate its "show line breaks," and "show tabs and spaces" features ... then you can wear out your eyes trying to ignore the clutter of the special markers :) Structural/Semantic delineation with white space is a Satanic plot :wtf:
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
-
I'm not a python dev. I have written exactly zero bits of software in it. That said, even I know you can do practically anything with it, and a lot of complicated things can be shockingly easy to do in python. I'm guessing that's probably why it's so popular with the AI crowd. The thing that keeps me away from it is the significant whitespace in the grammar** and my general distaste for scripting. I know both of those things are just me being nit picky but we all have our preferences. **I'm deeply concerned about this as it raises a lot of questions. Is 4 spaces read the same way as a tab? Is my editor going to destroy my sourcecode if it reformats the document? etc. I really don't like this.
Real programmers use butterflies
-
"All these cool things you could do with Python" is very rarely because of the language itself, but due to the ecosystem built around it. A similar ecosystem built around any other language or platform would be just as cool ... in principle. From a technical viewpoint. But the psychology of identity is super-essential here. A Python package is for us, we the Python community. Let those C++ and C# and VB and Fortran guys do their own, if they like - that's none of our business. We could try to build a similar ecosystem around dotNET, with the same spirit surrounding an assembly well rivaling PyPi in size and variation, available to all dotNET languages. But what sort of identity and unifying community is that? I think it is far from realistic creating anything close to the same enthusiasm around dotNET, without that focusing point that is The One Unifying Language that we all speak in our code. There is nothing in the Python language as such that makes it more suitable. What is does or does not offer in programming mechanisms isn't essential. But its function as a beacon to lead you into safe waters of a cool ecosystem is.
:thumbsup: imho, this is elegantly said, and points to the social context changing as more and more computational and graphic power are available, affordable. Narratives, often mythic, form around computer languages qua social movements. With Python, I have wondered if the "sole author" origin has added an aura of "for the rest of us" ... of individuality vs conformity. The mythos that Steve Jobs was such a conscious creator and performer of ... his "reality distortion field" ... term first used by Bud Tribble at Apple Computer in 1981 to describe Jobs.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
-
:thumbsup: Interesting, imho, I witness, have witnessed, similar "fervor" with other languages/tools. Back in the early 80's ... I am an antique ... I would run into proponents of the FORTH language who were "evangelical" about it to the point of being "missionaries." After my rehab from a brief infatuation with LISP, I went on to BASIC, Logo, finally PostScript, and C#. I remain convinced that spreadsheets + macros (particularly after VBA macros came along) really did enable a lot of intelligent people get productive.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
BillWoodruff wrote:
proponents of the FORTH language who were "evangelical" about it to the point of being "missionaries."
Those I knew of the kind were it in a literal sense: The black book tells us not only which language to use, but also which operations to perform: Go Forth, and multiply! (They were not serious. It was their standard joke.)
-
all true. my main issues with scripting are these: 1. Usually because of duck typing and lack of full compilation and such errors can be harder to track down. 2. In terms of performance it is so often hard to know exactly what is going to cause the performance issues, or worse, sometimes there isn't a reasonable way around it. That's fine, when scripting is used here and there in moderation, but it's a different story when you're powering an entire application with it.
Real programmers use butterflies
honey the codewitch wrote:
Usually because of duck typing and lack of full compilation and such errors can be harder to track down.
Oi, that is definitely the worst thing. I wrote a complicated application to run on an rPi that dealt with hardware inputs and outputs, various configurations, etc., and it was painful, and I mean PAINFUL, to run the program only to discover I had some stupid typo. PyLint helped a lot! As did mocking the classes that did the hardware interface (with a UI written in GTK, yuck), and running the thing on my PC first. Which was awesome, being able to test and debug on Windows before shuffling the code over to the rPi!
Latest Articles:
Abusing Extension Methods, Null Continuation, and Null Coalescence Operators -
Join the Python Software Foundation[^] and you can tell them how to do it properly.