Hex Casting

Hex Casting

6M Downloads

Feature Request: Reverse Hermes "Halts" the Hermes evaluation of a list of patterns.

KirinDave opened this issue · 0 comments

commented

Wiresegal asked me to leave this in bugs so that it can be examined after the Fabric port is done.

I request that we have a "Halt" command (which takes the mirror shape of Hermes). This will tell Hermes to stop evaluating the pattern list and ignore anything that comes after it.

This offers a bunch of new functionality that we currently don't have. A halt instruction's most obvious side effect for the mod is that single dimensional loops (as recursion) are more straightforward to write, and so more people will write looping code.

An example program and what output we might expect:

intro mindR 3 blink halt impules retro hermes

This should blink the player 3 spaces and not result in an error.

intro mindR 3 blink halt 0 retro hermes

This should blink the player and leave an empty stack, not a stack with a 0 on it.

intro mindR 3 blink halt 0 retro 4 0 hermes

This should blink the player and not result in an error or a stack value. (This one replaces a valid pattern 0 with an invalid and unescaped literal 0).

Wiresegal also says, "Also put in a note about “remember to nuke side effects”"