News for hackers. Stuff that matters.
Re:Reasons Python Sucks by ErikCorry on Saturday January 14, 2023 @07:46PM (#34385619)
Here's a better list.

* Performance is very bad.

* Misspelling a variable creates a new one.

* __init__ is a really terrible name for the constructor.

* Type annotations are ignored, so nobody bothers.

Re:Reasons Python Sucks by mjr00 on Saturday January 14, 2023 @07:53PM (#34385658)
> * Type annotations are ignored, so nobody bothers.

For any serious Python app worked on by multiple people, you need a CI pipeline that runs type checking. (And while you're there, run a format checker like black, too -- solves the tabs vs spaces "debate" the author complains about as well)

Certainly still a language flaw that it's not inherently enforced, though; unfortunately it just took the Python community way too long to realize how important strong typing is at scale.

Re:Reasons Python Sucks by raymondh on Saturday January 14, 2023 @08:32PM (#34385884)
Indeed, this list is better.
Re:Reasons Python Sucks by 323 on Saturday January 14, 2023 @07:53PM (#34385656)
> Misspelling a variable creates a new one.

IDEs/linters help with this one.

> Type annotations are ignored, so nobody bothers

If one really cares you can use MyPy to force errors on bad types.

Type annotations are very useful for IDEs, which is why they are spreading fast in the ecosystem.

Re:Reasons Python Sucks by aYsY4dDQ2NrcNzA on Sunday January 15, 2023 @02:39AM (#34387514)
You probably already know that __init__() isn’t a constructor, technically; it’s an initializer.