DEV Community

Discussion on: The scientific proof of that OOP is a mass psychosis

 
moopet profile image
Ben Sinclair

I'm looking at the example as well and wondering basically what the Hyperlambda one does. It's not clear how the (a)synchronicity works to me.

Either the whole thing blocks inside join until all the forked paths complete or it returns some kind of result which is a "pending" state, like a promise.

The thing about the assignment, as well... in the C++ example you say that newbies will look and ask what the assignment's for - well I'm wondering why you included it at all. If you miss it out, then (presumably) the two pieces of code do much the same thing, except this C++ version does it in a particular order rather than in parallel.

Thread Thread
 
polterguy profile image
Thomas Hansen

It creates two thread, and waits for both of them to finish. It's non-blocking invocations (async), so no threads are blocked while it's waiting for IO. Remove the join, and it no longer waits. The result becomes additional nodes below the http.get invocations. You can run it through the "Evaluator" in the Magic dashboard to see its result ...