News for hackers. Stuff that matters.
Re:Pyre: Fast Type Checking for Python by jhall1468 on Friday May 11, 2018 @01:41PM (#17049322)
> The point of type checking is that it has to be rigorous, it doesn't do anything for you if it doesn't check types.

I don't always need to check types. I don't need to know that isReady returns a bool. It clearly returns a bool. This idea that type checking has to be absolute is because in statically typed languages it does, not because that's a forgone conclusion.

Re:Pyre: Fast Type Checking for Python by merlincorey on Friday May 11, 2018 @02:52PM (#17049904)
> I don't always need to check types. I don't need to know that isReady returns a bool. It clearly returns a bool.

I'm sorry but you're mistaken, friend. I checked the signature of that function and it actually returns an enumeration of ready states:

    enum class Ready { Insert, Process, Clean };
    const Ready isReady();
Static typing is extremely useful for knowing what things return - names are not.
Re:Pyre: Fast Type Checking for Python by jhall1468 on Friday May 11, 2018 @06:48PM (#17051268)
> Static typing is extremely useful for knowing what things return - names are not.

Only if you completely ignore convention (that is prefixes return bools) then, sure, it's not useful. But if you just want to break conventions, then all of this is moot because you are guaranteed to do stupid stuff outside of that.

Re:Pyre: Fast Type Checking for Python by elbear on Saturday May 12, 2018 @02:25AM (#17052753)
Even if you don't want to break conventions, you might do it by accident. If you don't have a compiler (or a static checker of some sort), there's no one there to keep you consistent.
Re:Pyre: Fast Type Checking for Python by Too on Saturday May 12, 2018 @12:50AM (#17052529)
You are assuming that your usage of isReady will be flawless every time. What if you call a function updateUser("username", isReady()) but it turned out you remembered the order of arguments wrongly. Then the type checker will tell you as you can't pass a bool to a string argument and vice versa. This type of error is super common in %-string formatting.

It won't help if all the arguments have the same type unfortunally but at least it catches something. Just like unit tests, they won't catch everything so the more checks we have and the earlier we run them the less risk there is something slips through to production.