4 ms·
This does look quite nice. I always felt that the operator precedence / association rules in other stack languages were by far the most difficult thing to get u
by jkafjanvnfaf 3y ago
This does look quite nice. I always felt that the operator precedence / association rules in other stack languages were by far the most difficult thing to get used to, not the nonstandard symbols. This appears more inviting in that regard.
I do have to question the choice of right-to-left (array language) evaluation order. I've personally always preferred left-to-right (stack language) evaluation. I feel like right-to-left requires you to think to the end of a line before you start typing anything at all, as the first thing you type is the last thing that's evaluated. Left-to-right would also allow re-evaluating and visualizing the stack as you write each operator.
- alexisread 3y ago...Swap your language prefs to say, arabic? ;) More seriously though, I think it depends what your background is. Maths works in prefix notation eg. f(g(x)) but I appreciate that you can hold the stack in your head easier with postfixLR. Many people who are used to lisp would probably prefer prefix notation. non-stack or array langs have a nice tradeoff that you can look at the code without having to keep a model in your head, notably many forth users annotate their code with stack diagrams to help. Personally I'm quite taken with rebol syntax, passing a stack/array as the rightmost operand. http://blog.hostilefork.com/rebol-vs-lisp-macros/ http://blog.hostilefork.com/rebol-vs-lisp-macros/
- aebtebeten 3y agoSee https://lobste.rs/s/qygnov/uiua_concatenative_array_programming#c_xzzx7g https://lobste.rs/s/qygnov/uiua_concatenative_array_programm...
- sullyj3 3y ago> I feel like right-to-left requires you to think to the end of a line before you start typing anything at all Maybe this will make people tend to shorter lines, counterbalancing the natural tendency towards incomprehensibility of array and stack languages