News for hackers. Stuff that matters.
Re:Kotlin: The Problem with null by modalduality on Friday January 12, 2018 @09:21PM (#16137901)
Most languages with monads have tools for working with them. In Haskell, for example, even without `liftM2` or `sequenceM`, you can simply do

    case (xm, ym) of
        (Just x, Just y) -> x + y
        _ -> 0
Re:Kotlin: The Problem with null by masklinn on Saturday January 13, 2018 @06:36AM (#16139193)
That's got nothing to do with monads though, you can do that in Swift or Rust which have a monadic option type but don't actually have monads:

    match (xm, ym) {
        (Some(x), Some(y)) => x + y,
        _ => 0
    }
Re:Kotlin: The Problem with null by quotemstr on Saturday January 13, 2018 @02:21AM (#16138623)
Oh, come on. Is yielding 0 there really the best approach? It's a copout. You want full referential transparency.