top | item 40650871

(no title)

pierrebai | 1 year ago

Reading the example, I really wish the syntax for push and pop had been "<foo" (push foo on stack) and ">bar" (pop from stack into bar). I find the choice of $ and ^ not obvious. Especially since, for me, ^ implies popping, not pushing.

discuss

order

xorvoid|1 year ago

You can fork and fix that with sed. Haha.

I decided on using sigils and then my thought-process drifted to Perl/Php, so $ naturally felt like a variable definition (which naturally must pop from the stack). I guess ^ is “push ‘up’ to stack”. But it’s all really arbitrary irrelevant syntax. YMMV.

dandanua|1 year ago

'$' is common for interpolation in many languages. It's a good choice.

Awesome language, and it's definitely important from a theoretical point of view. However, you've missed the chance to call it "LiFo" :)

quibono|1 year ago

Interesting. I'm not sure about $ and ^ either but I think I'd keep getting confused about which one of < and > meant pushing vs pulling

dugmartin|1 year ago

Maybe + for push and - for pop?