Re:Show HN: Python library for functional programming
by catnaroek on Thursday December 14, 2017 @11:26AM
(#15923527)
> I don't use this but you could argue that it's useful to have a standard encapsulation of failure/missing that isn't null?
I don't see what encapsulation you're talking about. Maybe and Either are very much concrete, not abstract, data types.
> Where some situation means that null already has a meaning, the alternative is to create a wrapper class for your situation (not general), or a general wrapper class which is basically what this is.
Unless you want to take advantage of existing plumbing infrastructure such as a monad transformer library, custom wrapper classes for your particular situation are precisely the right tool for the job.
Edit: although I guess that just using a tuple would be better for this maybe