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


AFAIK, Forth would be so. And other RPN based languages, if there are any.

@rudolf @codesections codesection's example is going from "row major" to "column major", not reversal of the resulting total ordering, though. (Also, Factor, Postscript, Joy...)

@rudolf @codesections Thinking about it, RPN languages are just like conventional imperative languages in this regard; data is processed and declared from left to right, line by line, as opposed to top-down column by column.

Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.