4 ms·
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 $
by pierrebai 2y 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.
- xorvoid 2y agoYou 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 2y 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 2y agoInteresting. 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 2y agoMaybe + for push and - for pop?