News for hackers. Stuff that matters.
Re:Mercurial’s journey to and reflections on Python 3 by novok on Monday January 13, 2020 @02:29PM (#22037695)
Having done a py2 to py3 migration and ran into the same issues, these wouldn't of been that big of a deal IF python had static typing from the get go.

The static compiler would notice all the breaking type changes at compile time and you can systematically fix all of them at once. You wouldn't miss one or two and have to run your unit testing suite to exercise the type system underneath.

I really believe big breaking changes like this in a language causing migration stagnation is a property of dynamically typed languages. With other statically typed languages like swift or rust, it happened quite frequently but wasn't as big of a deal in practice.

Re:Mercurial’s journey to and reflections on Python 3 by TylerE on Monday January 13, 2020 @06:15PM (#22039834)
Python with static typing wouldn't be python. It wouldn't even be python-adjacent.
Re:Mercurial’s journey to and reflections on Python 3 by weberc2 on Monday January 13, 2020 @06:21PM (#22039883)
Python has had static types for years. https://www.python.org/dev/peps/pep-0484/
Re:Mercurial’s journey to and reflections on Python 3 by TylerE on Monday January 13, 2020 @07:02PM (#22040215)
Yes, because optional annotations are totally the same thing as changing the languages basic functionality.
Re:Mercurial’s journey to and reflections on Python 3 by weberc2 on Monday January 13, 2020 @07:43PM (#22040560)
Oof, that’s quite a take. Static type checkers by definition don’t change the language’s functionality; they merely check the types.
Re:Mercurial’s journey to and reflections on Python 3 by TylerE on Tuesday January 14, 2020 @12:33AM (#22042139)
Static typing is ceremony. That is anti-Python.

If you want Java, write Java. Don't try to make Python Java.

Re:Mercurial’s journey to and reflections on Python 3 by weberc2 on Tuesday January 14, 2020 @09:35AM (#22045036)
It’s literally Python, and if you’re writing sane/correct Python, you should hardly notice (things will work a little better, documentation will be more complete and actually accurate, etc). You can even do many of the same bizarre things that shitty Python programmers do without static typing, such as return differently types data based on the value of an input parameter. Someone passes in the string “asdf” so we’ll return an int, but if they pass “xyzfoo” we return a datetime. Next thing you know you’ve built matplotlib.