4 ms·
Could someone explain this bit from the intro to me? > Recursion is very efficient in the Om language, due to (a) the "eager" evaluation model enabled by prefi
by Garlef 4y ago
Could someone explain this bit from the intro to me?
> Recursion is very efficient in the Om language, due to (a) the "eager" evaluation model enabled by prefix concatenative syntax...
How is the syntax of any relevance for the evaluation model?
Once the AST is parsed, the syntax is gone and we're just left with pairs of 'operator' and 'operand'.
- Garlef 4y agoAnother question about the syntax: Why are the curly braces also part of the syntax for operators? They are delimiters for the operands but also play some part in the definition of operators? Is this solving some problem or did the author just like curlies?
- myco_logic 4y agoIf you're talking about the curly braces after the backtick in the syntax diagram for operators, I think that's just a way to escape those special characters so you can use them in operator names. It would be the same as escaping a double quotation mark in a string literal with a backslash, i.e: "\""
- Garlef 4y agoMerci. Thets also the explanation I came up with for myself. And I guess it allows for some trickery with unquoting.
- nine_k 4y agoThe syntax allows to describe structures in a way that makes the evaluation model efficient, or even possible. Look at what lengths one has to go constructing a Y combinator when syntax does not allow to refer to the current expression to simply describe recursion.
- deleted 4y ago[deleted]