News for hackers. Stuff that matters.
Re:Elm – functional reactive language for interactive applic... by AlexanderDhoore on Sunday November 23, 2014 @02:51PM (#8649675)
But why not make the "lifting" implicit? If you put a signal into "distance", you get a signal back.
Re:Elm – functional reactive language for interactive applic... by pseudonom- on Sunday November 23, 2014 @04:41PM (#8650039)
That sort of unprincipled, implicit conversion is generally frowned upon (by Elm, Haskell, ML, &c.). It reduces type safety.

If all you want is syntactic sugar, Elm has infix lift operators so:

    let p = lift2 (+) Mouse.x Mouse.y
becomes:

    let p = (+) <~ Mouse.x ~ Mouse.y
If you don't like that, Haskell has `do` notation. If Elm also had it, you could do:

    let p = do
      x <- Mouse.x
      y <- Mouse.y
      return (x + y)
Re:Elm – functional reactive language for interactive applic... by deadfoxygrandpa on Monday November 24, 2014 @03:16AM (#8651474)
There was a discussion about this on the Elm mailing list: https://groups.google.com/d/topic/elm-discuss/PNtOH2CDHZo/di...
Re:Elm – functional reactive language for interactive applic... by davexunit on Sunday November 23, 2014 @02:59PM (#8649717)
Maybe it's just me, but that sounds very confusing.