In every programming language I've ever heard of, program control flows left→right and then top→bottom. That is, this psudo code:

{ print "1" } { print "a" }
{ print "2" } { print "b" }
{ print "3" } { print "c" }

would print 1a2b3c

Are there any languages (even eso-langs/DSLs) that invert that order, so that the above would print 123abc?

It occurs to me that a left-to-right control flow would be a good fit for a lot of "pipeline" type data work, and I'm curious if anyone has tried it

Follow

@codesections I've been working with the Chunks and Tasks programming model, see chunks-and-tasks.org/, where inside your function you register tasks for execution later. The order of execution can be restricted by data dependencies but is otherwise arbitrary. When two tasks can run in any order, they can also run in parallel. Your example has no deps. so the order would be arbitrary or all could run in parallel. However operations like "print" are forbidden, you can only output via return. 😉

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml