Re:How Kal Compiles Itself
by teleological on Sunday August 18, 2013 @10:58AM
(#6232826)
"wait for" and "for parallel" seem useful. Are they inspired by constructs in other languages, or do they have analogs in other languages?
[ Parent
| on HN ]
Re:How Kal Compiles Itself
by rzimmerman on Sunday August 18, 2013 @01:20PM
(#6233355)
"wait for" turns out to be somewhat analogous to the upcoming "yield" statement in ECMAScript 6 as well as .NET patterns for async code. "for parallel" must exist somewhere (it almost looks like functional programming). I actually added it as an afterthought when I decided "wait for" ought to work inside of loops. It uses the same mechanism as async.js's "map".
Fortress and Scala have similar concepts
(0 to 10).par.foreach(expensiveOp)