16 ms·
Release of new version of Elm (A functional reactive language for interactive applications) "This release introduces tasks, a way to define complex asynchronou
by thomasweiser 11y ago
Release of new version of Elm (A functional reactive language for interactive applications)
"This release introduces tasks, a way to define complex asynchronous operations. Similar to C#’s tasks and JavaScript’s promises, tasks make it simple to describe long-running effects and keep things responsive. They also provide a way to wrap up tons of browser APIs in Elm."
- rudi-c 11y agoThis is awesome. Dealing with HTTP requests used to be a pain since they were all signals even when they were used only once, which was not intuitive. This should make the language much more usable.
- nijiko 11y agoI prefer the backcalls of LiveScript to any implementation I have seen thus far, coupled with do, you can do some pretty complex things
- johnpmayer 11y agoThere's probably going to be something like do-notation in Elm 0.16.
- CMCDragonkai 11y agoAren't promises just a monad?
- RehnoLindeque 11y ago(Task x) has monadic structure, yes (see andThen, succeed). Naturally it also looks like Functor, Applicative, etc. However, there is no way to work with monads in the abstract in Elm (yet), there is only the concrete API.
- CMCDragonkai 11y agoIf it has those primitives, why not just wrap them up into a bind operator?