Re:The power of Result types in Swift
by hannofcart on Sunday June 17, 2018 @08:11PM
(#17335100)
It's a very well written article. I'm just a bit surprised there is no mention of the origins of this paradigm as it originated in functional languages (Maybe monad in Haskell).
[ Parent
| on HN ]
Re:The power of Result types in Swift
by wool_gather on Sunday June 17, 2018 @10:33PM
(#17335615)
This isn't Maybe. Optional in Swift is Maybe.
I think itβs closer to Either
Well, Either is a monad. Evolution of this style to avoid divergent nesting depths (The Codoken: http://i.imgur.com/BtjZedW.jpg) is a monad, even in the "railway" style of F#.