logoalt Hacker News

pwdisswordfishq • today at 9:01 PM • 2 replies • view on HN

So much trouble to avoid introducing the optional monad.


Replies

woodruffw • today at 9:06 PM

Python’s type system has union types (including Option), and using them is pretty ergonomic. As TFA points out the problem is that `None` gets contextually reused in all kinds of places where a proper sentinel type is more appropriate.

➕ show 1 reply
Waterluvian • today at 9:08 PM

I’m curious what that would practically look like in Python.

I bet this would be a good use of vibe coding. Experiment with what-ifs. I can imagine being able to “show not tell” and reduce the signal-to-noise of comment opinions.

➕ show 1 reply