3 ms·
The loops are still there, they're just implicit. That's how APL-family languages can be parallelised easily. It's notable that the first J interpreter, while
by userbinator 5y ago
The loops are still there, they're just implicit. That's how APL-family languages can be parallelised easily.
It's notable that the first J interpreter, while written in C, has a similar style --- it defines a macro to run a loop "implicitly", and then uses that throughout:
https://code.jsoftware.com/wiki/Essays/Incunabulum https://code.jsoftware.com/wiki/Essays/Incunabulum
- air7 5y ago> The loops are still there, they're just implicit. Obviously. I think the point is that loops should be considered "implemention details" at the compiler level, and us higher beings should be able to say what we want without troubling ourselves with them.
- dkersten 5y agoThe article does have a heading "Examples of Implicit Loops", so the author acknowledges that the loops are there, but implicit. I guess "implicit-only-loops code" or "explicit-loop-less code" or whatever isn't as catchy a title, but I don't think anyone reading it expects it to be literally loopless code.
- xelxebar 5y agoThe current interpreter even has this! In fact, the meat of many (most?) functions is implemented using the (functions underlying the) primitives. It's kind of fascinating to skim through, if you're already familiar with array programming. The code goes way out of its way to reduce the impedance mismatch between J and C semantics.