News for hackers. Stuff that matters.
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).
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.
Re:The power of Result types in Swift by dwaite on Sunday June 17, 2018 @09:15PM (#17335304)
I think it’s closer to Either
Re:The power of Result types in Swift by KirinDave on Sunday June 17, 2018 @10:37PM (#17335635)
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#.
Re:The power of Result types in Swift by hota_mazi on Monday June 18, 2018 @12:15AM (#17335991)
No, `Result` is more like the `Either` monad.