Are the critiques in "All the things I hate about Python" valid?

Rick Johnson rantingrickjohnson at gmail.com
Mon Feb 19 22:09:35 EST 2018


On Friday, February 16, 2018 at 10:25:32 PM UTC-6, Chris Angelico wrote:
[...]
> This is often touted as a necessity for industrial-grade
> software. It isn't. There are many things that a type
> system, no matter how sophisticated, cannot catch; for some
> reason, though, we don't hear people saying "C is useless
> for industrial-grade software because it doesn't have
> function contracts".

And likewise, there are many problems that a seatbelt cannot
protect you against -- like for instance: a car-jacker
shooting you in the head at point-blank range. But we don't
throw the baby out with the bath water, do we?

> Anyway, if you want some system of type checking, you can
> use static analysis (eg tools like MyPy) to go over your
> code the same way a compiler might.

Are you suggesting this project for std-lib inclusion?

> "The first glaring issue is that I have no guarantee that
> is_valid() returns a bool type." -- huh? It's being used in
> a boolean context, and it has a name that starts "is_". How
> much guarantee are you looking for? *ANY* object can be
> used in an 'if', so it doesn't even matter. This is a
> stupidly contrived criticism.
> 
> > Python markets itself as a dynamically-typed programming
> > language, similar to Perl, Ruby, or JavaScript. The word
> > “dynamically typed” has a positive connotation, more so
> > than “weakly typed.” Conversely, the word “strongly typed”
> > sounds more positive than saying “statically typed.”
> 
> Those are all different terms, and all of them are
> misunderstood. They're not synonyms.

The author was underscoring the unfortunate psychological
semantics at play when words like "strong" are juxtaposed
with words like "weak". Sadly, old boy, i believe you've
missed the point!

> > Python ships with a threading module; but due to how the
> > Python interpreter is implemented, it can only ever run
> > one thread at a time. This is due to the infamous Global
> > Interpreter Lock (GIL). In an age when the only computers
> > around had a single core, this was nothing to fuss over.
> 
> Totally not true. The GIL does not stop other threads from
> running. Also, Python has existed for multiple CPU systems
> pretty much since its inception, I believe. (Summoning the
> D'Aprano for history lesson?)

Unfortunately "D'App-ran?...Oh!" is still debugging his hello
world program. He'll be along later. Or never... Whichever
comes /last/.

[...]





More information about the Python-list mailing list