On Thursday, December 8, 2016 at 5:27:53 PM UTC, Vojtěch Král wrote: > > Dne středa 7. prosince 2016 17:18:37 UTC+1 Mark Hamburg napsal(a): >> >> Would it help if there were a standard mechanism to invoke JavaScript >> code as a task (or equivalently to make JavaScript code available as a >> task)? >> > > Yes! Very much! If this happened, I'd definitely revisit the decision to > leave Elm. >
I'm not sure that calling Javascript as a Task solves the issues you brought up. Specifically that an ordinary function call becomes asynchronous - you have to then schedule the task to be run and get back the result as a msg to your update function. Sometimes you just want to call a foreign function and get the answer back right away. Of course, with native modules it is very easy to do this already with Elm. You just can't publish a package with it in to the official repo. -- 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.
