A full stack, reactive architecture for general purpose programming. Algebraic and monadically composable primitives for concurrency, parallelism, event handling, transactions, multithreading, Web, and distributed computing with complete de-inversion of control (No callbacks, no blocking, pure state)
"Now this is another story: this time choose' is a Transient primitive. It stops the current thread and launches a new thread for each of the elements in the list. Since the main thread dies, the computation could finish before the launched threads complete. This is the reason for the name "transient": because it manages transient threads. This is why it is called keep. It prevents the program from exiting when the main thread dies. exit escapes the keep block."
Exit is just an identifier, right? So what actually escapes? And why can the computation only finish because the main thread dies?
"In this applicative expression, both async operations run in parallel, within different threads. When the first finishes, it inspect the result of the other. If it has no result yet, the inspecting thread stores its result and dies. When the other thread finishes, it sees the result of the previous one. Then, it completes the applicative expression and prints the result. The computation brought to async runs in the IO monad:"
Too many words are used to identify threads here, including "other", "inspecting thread" and "previous one". This paragraph would benefit from a sequence diagram.
"It produces the same result, but this time, the original thread is the one that runs the IO computation of the second term, instead of dying."
What is meant by "original"? Why not just say "main"? Also, why call it "second term"? It could be given a name and it would be easier to refer to.
"Actually, a Cloud computation is a transient one, with a very thin layer that assures that the type system makes the program aware of the need to log and recover intermediate results, in order to re-create the closures at the remote node."
The last sentence is very complicated, and how can the type system tell any program anything? Does the Cloud cloud monad force logging? If so, this sentence could be made simpler.
"Unlike Cloud Haskell and other distributed frameworks that use static closures, Transient distributed programs don't need to be identical in all nodes, neither do the nodes have to share the same architecture. It is enough to share the same snippet of code that is called."
Thanks. These comments are invaluable. I want to make it as clear and precise as possible. If possible for beginners. I have made the changes. Can you verify that they are ok?