News for hackers. Stuff that matters.
Re:Ask HN: Why Did Python Win? by dragonwriter on Wednesday August 30, 2023 @12:22PM (#37324383)
> I'm pretty sure I'd see multiple cases where the function would return different types depending on a code path.

Quite commonly by design, or, “why union (and sum) types are a thing”.

Something returning type “Foo | nil” is very often going to return Foo on one branch and nil on another.

There are no comments on this comment yet.