News for hackers. Stuff that matters.
Re:Mercurial’s journey to and reflections on Python 3 by lmm on Monday January 13, 2020 @11:45PM (#22041918)
None of that would be a problem in a typed language. The ultimate destination of any string literal is some standard library function, whether that's write to network socket, display to user, or something else. So you just ripple backwards from that through your own functions that are calling those standard library functions, until you get to the point where you're passing in the literal, and then you know what kind of literal it needs to be.
Re:Mercurial’s journey to and reflections on Python 3 by vmchale on Tuesday January 14, 2020 @12:23PM (#22046935)
> None of that would be a problem in a typed language.

Python is dynamically typed and weakly typed, but still typed. That's precisely the problem! The difference is just that a statically typed language gives you all the information, and a dynamically language doesn't, but still fails. Just without providing you the necessary information up-front.

There's a nice explanation here: https://existentialtype.wordpress.com/2011/03/19/dynamic-lan...

Re:Mercurial’s journey to and reflections on Python 3 by lmm on Tuesday January 14, 2020 @07:21PM (#22050636)
> Python is dynamically typed and weakly typed, but still typed.

People who claim that dynamic typing is a thing claim that Python is strongly typed. (This is of course nonsense; there's no such thing as dynamic typing, because types are by definition something that expressions in a language have, not something that runtime values have).

> There's a nice explanation here: https://existentialtype.wordpress.com/2011/03/19/dynamic-lan....

That is not a "nice explanation". It is writing to obscure rather than to clarify. And it certainly acknowledges that one cannot have differently typed values in a dynamic language.

Re:Mercurial’s journey to and reflections on Python 3 by war1025 on Tuesday January 14, 2020 @12:08AM (#22042024)
That's not really much different from the path we took. It's just instead of running the compiler, we ran the linter and test suite until things passed. It's just when you have a million lines of code that takes quite a while.