News for hackers. Stuff that matters.
Re:Side Effects vs. Promises by edgyswingset on Sunday October 04, 2015 @02:45PM (#10328377)
I'm not a Haskeller and haven't played with monads knowing they were monads, but async in F# basically works like this:

1. Call the function with async { } block and have it return a computation object

2. Start that computation object in three primary ways:

  a. On another thread, then wait (non-blocking) on it to finish

  b. On another thread but don't wait for it to finish

  c. On the current thread and don't wait for it to finish
There's a lot more details but that's going to cover probably 95% of the use cases.

My takeaways from it are:

a. Super easy to write code for it that's easy to read

b. Really hard to fuck it up

In my opinion, it's superior to the model that C#/VB have ... and pretty much every other language I've tried async support on. Have yet to use Haskell for it.

There are no comments on this comment yet.