I sometimes find myself writing two versions of a function for handling absence differently, e.g. `subscription(): Subscription` and `subscriptionMaybe(): Subscription | undefined`. I assume that there's some weird burrito trick for this but I've made my peace with it.
-
Show this thread
-
Replying to @garybernhardt
@propensive did something like this in Scala, where you could pick your burrito, or go for a naked burrito. To torture the analogy.1 reply 0 retweets 1 like
Replying to @AlanJay1 @garybernhardt
I had a few experiments with this, but I gave a talk on an idea I called "modes", where you basically chose your monad type with an implicit. I was never 100% satisfied with it, though... and I guess I'm still searching. :)
11:05 PM - 12 Aug 2019
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.