3 ms·
"wait for" and "for parallel" seem useful. Are they inspired by constructs in other languages, or do they have analogs in other languages?
by teleological 13y ago
"wait for" and "for parallel" seem useful. Are they inspired by constructs in other languages, or do they have analogs in other languages?
- rzimmerman 13y ago"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".
- octo_t 13y agoFortress and Scala have similar concepts (0 to 10).par.foreach(expensiveOp)
- qu4z-2 13y agoC# has range.AsParallel().Select(expensiveOp); Which is hilariously verbose, and map is called select. But it's nice to have...