One doesn't need them to be asynchronous but making them asynchronous helps reinforce the notion that this is happening outside the Elm universe. And if you want monads, Elm's tasks are monadic.
Mark On Mon, Dec 12, 2016 at 6:16 AM, 'Rupert Smith' via Elm Discuss < [email protected]> wrote: > On Friday, December 9, 2016 at 8:07:33 PM UTC, Mark Hamburg wrote: >> >> While there are certainly times when synchronous calls would have been >> nice, I recognize that having synchronous behavior for potentially mutable >> external state also tends to imply a lot about execution order — something >> that a pure functional language expects to be more free about. Hence, I >> think it's reasonable to force operations that need to deal with the >> external world to be asynchronous. >> > > Consider monads in other fp langauges. You don't need to have an > asynchronous model to work with external state and side effects. > > I suppose you could describe Elm's event driven loop as a monad, in the > sense that it chains together sequences of functions over messages. > > -- > You received this message because you are subscribed to the Google Groups > "Elm Discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
