Readit News logoReadit News
bragr · 2 years ago
I wish people could be honest and say they don't care for some language or framework or OS for personal or aesthetic reasons, rather than having to round it up to being objectively bad, but then I suppose nobody probably would click on "I don't like Python and have got some nits to pick".

Oh and he just says what is supposed to be quiet part at the end:

>And, not to put too fine a point on it, but if you can code Python but not Go (or another decent programming language), you probably have no business writing software for a living. I know it sounds harsh and I apologize for that, but writing software is a profession and hence you should have the knowledge, skill, and experience to use professional tools.

Hear that all data scientists, flask devs, systems engineers, and ML folks? Python is bad so you should quit. ;)

Exuma · 2 years ago
I see this sort of person as an extremely rigid, unbending, dime a dozen type person even if they’re very intelligent. I’m in this business to succeed and build and create things, there is very much an “energetic” aspect and his energy is dead as fuck. It’s a very simple fact that some see it, and some don’t. He’s one who doesn’t, and all those that see it can see it so clearly. He’s most definitely not someone I would want on my team.

The amount of idiotic … implications of his statement is so excruciating it’s physically painful to me. But I encounter this unadaptive unawareness all the time with working with programmers from other teams, etc so I’m used to it.

JJMcJ · 2 years ago
He published an article in June titled "It is not cool to be unkind!".

Interesting contradiction.

I know someone like that, very energetic, full of ideas, but so stubborn I'm sure it holds him back.

jrm4 · 2 years ago
Aha, you pointed out the disease.

This is the biggest problem in software and it's kind of intractable.

The ideal world has tools that empower everyone to do what they need to do, which to some extent must include an activity like programming.

But, and this may be unconscious, "people who program for a living" have a strong incentive to gatekeep.

taylodl · 2 years ago
What's amazing is people who program for a living, who people would normally think of as being "experts", have so little knowledge of all the different types of programming that is done by, well, people who program for a living, and the tools they use to do that programming.

Not only then is it gatekeeping, it's also a sign of an inexperienced programmer.

I'll give one thing to Python programmers, they tend to work directly with their end users and build solutions that matter to them. Anyone that's done that kind of work knows it's difficult, regardless of programming language being used.

jengroff2 · 2 years ago
Clearly a Go enthusiast who never mastered Python. And, really, Go? If your were pushing Rust mayyyybe I could give you the benefit of the doubt.
dragonwriter · 2 years ago
> I wish people could be honest and say they don’t care for some language or framework or OS for personal or aesthetic reasons, rather than having to round it up to being objectively bad, but then I suppose nobody probably would click on “I don’t like Python and have got some nits to pick”.

Yeah, this kind of hyperbolic headline article repeating mostly dead-horse arguments is just low-effort click farming, not a serious contribution to the discussion of anything. All it adds to what is a well-trodden debate is…factual errors, like the claim that Python prominently features “lazy evaluation” (while, as in any language, you can arrange laziness in Python, it is very much eager normally.)

rvieira · 2 years ago
I really think that Python is not a good language for ML, it just got "there" first.

The ecosystem is the real plus, of course. But the language is a headache for this. I agree with the "false economy" angle. I would happily trade the "agility" of dynamic "gluing" with some kind of real type safety, human-readable error messages and performance[0].

[0] - hiding C in Python's clothes doesn't count :)

kaba0 · 2 years ago
Python is the de facto glue language with one of the biggest ecosystems out there, that makes it possible to use any kind of over-the-top library that does 1093 things after a single `import antigravity`. Also, ML absolutely makes sense for python, it’s not like most PLs have actual support for video cards — ML is very specifically about manipulating data (a fundamentally dynamic task) and calling out to specific libraries for training, a very glue-task. Give me any language better than python for that.

Quoting Brooks (butchered): “the only significant productivity improvement comes from relying on code that is already written”. Your fancy “better” language has not even 1/10th of what python has, it won’t replace it.

zffr · 2 years ago
> And, not to put too fine a point on it, but if you can code Python but not Go (or another decent programming language), you probably have no business writing software for a living. I know it sounds harsh and I apologize for that, but writing software is a profession and hence you should have the knowledge, skill, and experience to use professional tools.

Part of the profession of software engineering is maintaining software that's already written. Should the people who maintain python code, not be paid for their work?

Another part is choosing the right tool for the job. Python has its flaws, but it is better than Go in some ways. For example, it has a richer ecosystem of libraries.

IOT_Apprentice · 2 years ago
Let me ask the obvious question.

Why hasn’t the go community, of professional software engineers built an even richer ecosystem of libraries?

Is it ennui, incompetence, or attitude?

As Go came from Google, is that the attitude was, “I am a professional I’ll just write my own code to solve X”, rather than considering building a library that others can use?

Are libraries harder to build in Go? Is adoption of libraries by the Go community different?

Is it a mindset, that libraries are uninteresting?

Or is it something else entirely?

jerf · 2 years ago
Compare the number of programmer-hours on Python to Go. Having a ~15 year head start helps a lot.

Plus, I've been programming in Go professionally for a while and it's been a while since I reached for a critical library and it was missing.

Go ends up needing fewer libraries anyhow; in Python you have the pure-Python version, no, wait, the Twisted version (which may not be current but are still all there, increasing the library count), no, wait, the async version, no, wait, the Python 2 version, no, wait, the one that binds to a C library.... and actually this isn't specific to Go, it's really more specific to Python. Library count gets bloated up over the decades by the fact that when, for example, Python went to async, all non-async libraries in which async was relevant suddenly needed a clone. Go has had effectively no language changes which create such parallel libraries (note changes, not additions; Go has had additions which create opportunities for more libraries but don't create lots of parallel libraries). I don't know that Python is uniquely changing, "best practices C++" is arguably up there, Javascript has had a lot of churn, but it's in the higher tier of such things. Languages that don't churn like that should be able to cover the same amount of "need" for libraries in fewer libraries by the numbers.

andjd · 2 years ago
Yes. Go has a culture that avoids using libraries (the axiom is "a little copying is better than a little dependency" (see, e.g. https://www.efekarakus.com/2021/09/23/a-little-copying-is-be...)
timbit42 · 2 years ago
It hasn't been around as long as Python.
dafhagionio · 2 years ago
Why do people use Microsoft Windows on x86?

The computer industry has a bizarre reputation for moving fast and breaking things. In fact the industry is shockingly conservative. You will encounter many, many programmers who flat-out refuse to learn new things.

JetSpiegel · 2 years ago
What's the Go community? Google employees? There's no Go community, it's a corporate language.

Why hasn't the Visual Basic for Office community produced more libraries?

kaba0 · 2 years ago
Not sure if rhetoric question only, but Go has the expressivity of C. Let’s not compare it to python that is often textbook pseudo code like.
pkoird · 2 years ago
Terrible is using a dynamic programming language and expecting static features from it. Besides, linters and type hinting have come a long way.
dafhagionio · 2 years ago
>Besides, linters and type hinting have come a long way.

You acknowledge that the kinds of static analysis that are feasible in Python are valuable, but it's "terrible" to want the kinds of static analysis that are infeasible. How interesting that the two boundaries line up exactly.

bb88 · 2 years ago
If you want static typing, typically you want to avoid python.

If you want the freedom to easily mangle json or other dynamic types, you'd enjoy python.

the_af · 2 years ago
They have, but I find they still lag behind the state of the art. Python insistence on optional, second thought support for type hints is frustrating.

Linting has saved my bacon more than once, granted.

anonzzzies · 2 years ago
Still incredibly horrible for many cases. And very slow compared to things that have been around for decades. Do some ocaml and you see how incredibly bad everything 'linted' is. You can compile millions of lines in seconds in ocaml, eh delphi on a 90s computer, jai (I don't find Blow sympathetic but he does point out how lame everything is and that's good) etc, but when my 50k python or typescript project starts linting when doing a yarn build, I have time for a good workout.

Ocaml is an interesting example imho, as the type inference engine is so good you hardly have to specify types. When you read it and squint, it looks dynamic. It's not.

jerf · 2 years ago
There's an evaporative cooling effect. Ten years ago it was obvious that Python was going to have a very hard time in the multicore world. People who needed that performance and knew they needed that performance left somewhere in the intervening years. It has been obvious for a while that Python was not going to be capable of a general solution to that problem no matter what it did. Now those people are no longer in the Python community.

What's left are people who don't need that performance, which is sometimes me and is when I still am happy to use Python for something, and people who do need that performance, but don't know it. Those are the ones who get into trouble.

I do wish that the Python developer community would be more open about the fact that Python performance is really quite bad in many cases and that while there are some tools to peck around the edges, it is still fundamentally a low performance language, things like NumPy notwithstanding (it is, ultimately, still a "peck around the edges" tool, even if the particular edge it pecks it does extremely well, but that only makes the performance delta worse when you fall out of its accelerated code path). I feel like maybe back in the 200Xs the community as a whole was more open to that. Now "Python is slow" is perceived by the community as an attack. Maybe because the ones who did understand what that issue was are mostly gone.

But in the 2020s, yes, Python ought to be straight-up eliminated from many tasks people want to do today on straight-up performance grounds. Overcoming a ~40x disadvantage in the single core era was sometimes tough, but often doable. But nowadays basically that gets multiplied by each core on the system, and overcoming a multi-hundred-factor disadvantage is just not worth your time IF that is a level of performance you need. Python is nice, but not nice enough to pay for multiple-hundred-factor performance penalties. Static languages have come a long way since 1995.

the_af · 2 years ago
If the only problem with Python was its slowness, I could live with it! Its other problems are worse (like tooling, bad type hinting, etc).
jerf · 2 years ago
Agreed, but I think slowness is the one that is impossible to fix without making Python into something other than Python. Since the day it was born we were promised that Sufficient Smart Compilers would come along and make it as perfomant as C. We know what that looks like in the limit now, which is basically PyPy; it doesn't get to C except in small cases and eats a ton more memory in the process, and there's no reason to believe it will ever happen.

The semantics of Python are fundamentally slow. To fix that requires changing semantics. Such a change would dwarf 2 -> 3 in size and be effectively a new language, like "Perl 6" was.

melx · 2 years ago
"there are only two kinds of languages: the ones people complain about and the ones nobody uses".
jrm4 · 2 years ago
Every single "This language is good" or "This language is bad" take really needs to always come with a "for what, exactly."

"This wrench is really bad for hammering nails!"

the_af · 2 years ago
Agreed. But I also think it's fair to criticize general purpose languages on general grounds :)

It's just that this article isn't very good at it.

jrm4 · 2 years ago
It's fair, but the other thing happens WAY more.

It honestly just strikes me as very odd how e.g. even "just use multiple languages" is done a whole lot, but not really talked about as a good idea (as much as MY LANGUAGE IS GOOD AND YOURS IS NOT)

bPspGiJT8Y · 2 years ago
The author of this article does highlight the cases where using Python didn't work out well for them, in fact multiple times.
dekhn · 2 years ago
The context the author was working in was a large corporation with a demanding collection of services that needed to be managed. Many of the tools to manage those servers were written in Python, since many people know it, it was already widely used at the org, it had good support for C++ interop (also widely used at the org), and Java was found to be really clunky for sysadmin tooling.

I've seen both sides of it- I worked in the same sub-org as Jos, and my very first job was cleaning up a large pile of incredibly important and variable-quality Python code used to manage a fleet of database servers. the code was tools to do useful things like implement failover of the replication master (across ~90-120 shards) from one region to another for maintainence. Or apply schema changes across all those master shards. Or monitor the shards at runtime.

At times, the code would Exception (literally, crash with a Python exception) during the middle of an important but routine maintainence, and the migration would be half-done. I was hired- literally, this was my job- to add tests to the code until it was much more reliable. Working on that convinced me that rather than type-safety (which is nice, and can be used optionally in python), high test quality and high test coverage of paths used in production were more important to keep the code running smoothly.

I just wish Python hadn't made strings a sequence type, as one of the most common errors at the org was accidentally e m a i l i n g e v e r y s i n g l e letter in a To: string. IE, if it was "To: bore-sre@stoogle.com", then b@, o@, r@, e@, etc, would all get an email saying "Process failed..." And r@ would reply (because he's rob pike) saying "your python program has a bug...."

JohnFen · 2 years ago
Python is one of my least favorite languages and I avoid it wherever I can. I agree with several of the criticisms here, but I disagree with this part:

> The problem with Python is of course that it is an interpreted language with lazy evaluation

That isn't "the problem" with Python. There's nothing wrong with these sorts of languages. However, it does limit the sorts of problems the language is suited for, and I do see places where Python was used where another language would have produced far better results.

Perhaps using Python inappropriately leads to some thinking that the fault is with the language?

anonzzzies · 2 years ago
> with lazy evaluation

I know it has functions that are lazy, but it's not lazy as in a sense that Haskell is right? I never use it as I find it a ghastly horror show (my taste, other people like it, that's fine), but I had to use it a few times and found that (also from the article) some parts are lazy, but not python as a language. Is that not correct?

> it does limit the sorts of problems the language is suited for,

Interpreted (...) is the implementation, there is no reason why it should be interpreted.

kdmccormick · 2 years ago
You are right, the article is wrong. It is most certainly not lazy. f(g(), h()) will always call both h and g regardless of whether f uses their results.

Iteration in a sense can be "lazy", but that laziness is via data structures built on top of a strict core language. Python is not alone in having lazy iteratable data structures, but it leans into them relatively hard in its standard library.

Many of us love this, as it lets for loops work elegantly over all sorts of abstractions, but I could see some folks disliking it. Still, the author does not explain this nuance, which makes me think he does not quite know what he is talking about.

the_af · 2 years ago
Almost surely the author of TFA meant "dynamic", not lazy.

Nobody uses "lazy" in the sense of TFA.

epage · 2 years ago
Not Haskell style lazy but more of declarations are just another statement that aren't evaluated until those lines are executed. This means you can have function definitions inside of ifs which can be very useful for conditional programming / meta programming. Similarly, all variable accesses happen at runtime. This makes it so you can't truly statically verify the program but that the only way to know for sure how it will behave is to run it.

In an odd twist, function argument defaults are evaluated at function definition execution time rather than call-time (so half-way in laziness) so a `[]` as a default is shared between all users of that function and if you modify it you are changing a global. I heard that this led to a vulnerability within some security software.

Deleted Comment

cjfd · 2 years ago
Yes, pretty much agree with this word for word. It is very, very difficult to refactor a python application in any sort of reliable way. The standard way of error handling in python appears to be to present the user with a stack trace. Very user friendly (not!). Now people will say that, for instance, mypy can help with this. That is true but since projects can be started without type checking chances are that your project was started without type checking and that introducing mypy is somewhere on the backlog and when it comes off the backlog it will be enabled only partially because otherwise there will be too many errors and so on. It is such a garbage programming environment.
lloydatkinson · 2 years ago
I couldn’t (and still can’t) believe that non-exceptional situations are considered exceptional. Such as, there not being a way to parse a string into a number and return a value indicating if it was successful or not. With Python everything is an exception. Messy and inelegant. Of course this mess is called “pythonic” so everything is fine…

https://blog.codinghorror.com/exception-driven-development/a...

https://stackoverflow.com/questions/2184935/performance-cost...

justcool393 · 2 years ago
> parse a string into a number and return a value indicating if it was successful or not.

Eric Lippert had a decent blog post[1] back in 2008 on this titled "Vexing Exceptions" with regards to .NET.

[1]: https://ericlippert.com/2008/09/10/vexing-exceptions/

fragmede · 2 years ago
Whether or not you agree with it the argument for exception handling, rather than return values, is it lets the code more naturally flow for the successful case. The alternative is go's repetitive

    f, err := fn(...)
if err != nil { ... }

pattern. Which is better is really a matter of taste. To have error handling smattered all over the code seems more inelegant and messy to me.

dekhn · 2 years ago
What? You can return Exceptions instead of raising them. Since the language is dynamic, the caller can introspect.

Personally, from the perspective of a number parsing function, I think being passed an unparseable number counts as an "exceptional" situation- InvalidArgumentError- and I don't care which way it's returned- as an raised exception, or as an error object- as long as it's clearly documented, and the use matches the semantics of the function (NetworkNotAvailable is a better example of an exception where you're want to put something in the exception block)

PurpleRamen · 2 years ago
> The standard way of error handling in python appears to be to present the user with a stack trace.

What do you expect it to do? Silently fail and move on?

AnimalMuppet · 2 years ago
No. How about something that is neither "silently fail" or "print a stack trace"? How about something that lets the programmer handle the error?