I just realized something..

I come from making games with algols where queuing animations used this awkward kind of setup:

.then(() => {}).then(() => {})

Even back then it felt shitty to work that way but it was all I ever known, and over time I'd read about continuations, or stringing along an env variable, fussing with callbacks, it was just all bad, but you learn to live with it.

In catlangs, animation is absolutely seamless:

this then that

It is a valid way of sequencing animation functions because the atoms of a catlang can be concatenated. It's the ultimate scheme for doing gamedev animation in my opinion.

Anyhow, You wouldn't NAME a VARIABLE.

@neauoire any language with coroutines becomes very natural for this too. Eg our dialogue system has single scripts which wait for responses (no function boundaries) and this was extremely writer friendly.

I wonder about the similarities and differences vs catlangs

You can't concatenate them in most languages but you can just call them one after the other (or wrap them in a function which does that)

@maxc as long as they're not a special form, they'll feel something like in a catlang, if APL have continuations, I'm guess the tacit nature of the language will make them feel quite similar to catlangs; otherwise, it's context switching and noisy syntax just like in JS. In scheme, which I find quite beautiful, continuations are super slow and look like a stain.

@neauoire in lua it's cooperative multithreading basically. coroutine.yield and you can manage the calling yourself. Since it's just a function call it can be put wherever to build something that doesn't have to deal with the nuts and bolts when you're being creative.

So in Arco, dialogue:line("tizo", "yo") makes the character tizo say yo, and waits for player input before continuing the script. Extra nice that prompts can just return whatever was picked. It can take as many frames as it needs and the rest of the game can keep in trucking.

Not as elegant perhaps when you drill down inside I guess, but it's explicit, so you get to say when interruptions can happen, and once you're in a coroutine anything using that functionality is just a normal function call.