Python is not a great programming language.
gist.github.com
gist.github.com
Having multiple ways to do something (interpolating strings) isn't a bad thing. Usually the newish f strings are the easiest to use, but explicitly assigning variables via the format() function makes things more readable.Perl always had more than one way to do things.
Yes, nested list comprehensions are not readable, then don't use them. I have that as a personal rule.
I agree with him on Python ternary operator. Most languages have "condition", "success", "failure" in that order. This has "success", "condition", "failure" which feels wrong and always takes me longer to parse in my head than it should.
It is when the motto of the language says "There should be one-- and preferably only one --obvious way to do it." and that is applied whenever possible.
Because it's so damn productive, going back to more rigorous languages just doesn't feel as fun, I guess? Writing lengthy boilerplate just sucks out all enjoyment of coding, even though it might benefit your project in the long run.
My most productive language is C# because of visual studio + intellisense / strong static typing /LINQ.
I’m trying to do some ML stuff just now and it seems so slow. Maybe it’s because I’m trying to learn the python syntax as I go. Any tips?
Sure python is not perfect, so I expected to see a few valid points for a rant.
But instead, I was surprised to see these really really poor arguments. For exemple, this guy does not look like to have read a basic tutorial, lesson of python that would have told him the difference between lists and iterator things like generators.
I guess he will have hard time to understand the difference between computing a list in full in one go full in memory and iterators that can be efficient and only require having a few items in memory.
In my opinion, where he is very wrong is that the proof that python is a great language is its incredibly big user base size that mostly didn't come from 'hype' (unlike other recent languages), but from world of mouth and convenience!
But make no mistake: f-strings are NOT the same as .format()! One is compile time, the other is runtime. You can't localize f-strings.
eg working with Reddit api has a prebuilt python tool that can do a lot out of the box
Here is a new released book for people coming to D from Python, "D, the Best Programming Language, for Former Python Developers"[1].
I think maybe a couple years ago I had to ship some Python code because I needed to connect together some tasks into a workflow and Airflow seemed to let me get everything up, write tests, and instrument metrics to a monitoring solution I was using.
Last year I ended up doing a bunch of stuff with Spark. I hated dynamic typing in Python and my team agreed to go with Scala. Couldn’t be happier.
For example, Python was helpful for a script I wrote and left running on my MacBook to tell me when the PS5 dropped on Target. Ended up waking at 1AM PST to my phone ringing, opening up the Target app, and ordering the PS5. Picked it up the next morning.