3 ms·
APL is the perfect mind blower: https://xpqz.github.io/learnapl/intro.html https://xpqz.github.io/learnapl/intro.html
by skruger 2y ago
APL is the perfect mind blower: https://xpqz.github.io/learnapl/intro.html https://xpqz.github.io/learnapl/intro.html
- 082349872349872 2y agoUnfortunately Dijkstra and Iverson took personal dislikes to each other's approach, or we might have had a language that abstracted data flow like Iverson's APL and abstracted code flow like Dijkstra's Guarded Commands.
- abrudz 2y agoHave you looked at dfns (https://en.wikipedia.org/wiki/Direct_function https://en.wikipedia.org/wiki/Direct_function)? They allow you something very similar. Compare Dijkstra's GCL: if a < b → c := true □ a ≥ b → c := false fi To an APL dfn with "guards": c ← { a < b : true a ≥ b : false } As in GCL, if none of the guards hold true, the dfn (braces) will terminate without return value, and thus the code will abort with an error.
- 082349872349872 2y agothanks! very close, except for https://en.wikipedia.org/wiki/Direct_function#:~:text=guards%20are%20evaluated%20in%20sequence https://en.wikipedia.org/wiki/Direct_function#:~:text=guards... (seems like a degenerate, empty, dfn also behaves differently?)
- 082349872349872 2y agoand, modulo the above, we could spell "do X ◻ Y od" as "{X ♢ Y}⍣≡"?