News for hackers. Stuff that matters.
Re:Why Haskell? by akritid on Thursday September 12, 2024 @09:06AM (#41520474)
This came to mind while considering your interesting point: After such a change, wouldn’t you feel the urge to inspect all users of the stricter return type and remove unnecessary handling of a potential null return?
Re:Why Haskell? by cubefox on Thursday September 12, 2024 @10:35AM (#41521498)
I don't know about such urges. But sometimes there is no possibility to inspect all user code, e.g. when you are providing a library or API function.
Re:Why Haskell? by akritid on Thursday September 12, 2024 @08:08PM (#41526957)
Good point. In such case I would probably consider leaving the signature as is, even after tightening, and possibly offer a function with stricter signature for new code to use while deprecating the older variant. This would inform the users without rug pulling.
Re:Why Haskell? by cubefox on Friday September 13, 2024 @05:03AM (#41529398)
But that's not necessary in a language with union types of this sort. No rugs being pulled.