5 ms·
> The way that ryelang gets around this is that you pass the arguments in a "code block" surrounded by "{}" Like Lisp’s QUOTE which has to be a special form.
by gumby 3y ago
> The way that ryelang gets around this is that you pass the arguments in a "code block" surrounded by "{}"
Like Lisp’s QUOTE which has to be a special form.
- seanhunter 3y agoIn the maxima computer algebra system[1] which was ancestrally based on lisp it has a single quote operator[2] which delays evaluation of something and a "double quote" (which acually two single quotes rather than an actual double quote) operator[3] which asks maxima to evaluate some expression immediately rather than leaving it in symbolic form.[4] [1] https://maxima.sourceforge.io/ https://maxima.sourceforge.io/ [2] https://feb.kuleuven.be/public/u0003131/WBT23/wxMaxima/wxM_intro/the_single_quote_operator.html https://feb.kuleuven.be/public/u0003131/WBT23/wxMaxima/wxM_i... [3] https://feb.kuleuven.be/public/u0003131/WBT23/wxMaxima/wxM_intro/the_double_quote_operator.html https://feb.kuleuven.be/public/u0003131/WBT23/wxMaxima/wxM_i... [4] although (in my limited experience) maxima sometimes refuses to evaluate anyway even if you do the double quote thing
- zelphirkalt 3y agoIs this correct though? Lisp's quote would need some eval or something to evaluate later afaik. More fitting might be a (lambda () ...), a.k.a. lazy evaluation.
- tsimionescu 3y agoThe implementation of the if() function would be the one that calls eval() on the true or false code block.
- gumby 3y agoLambda is a special form
- Zambyte 3y agoI would imagine it is closer to lambda than quote (though also a special form), since the implementation of if would require that the bindings in the arguments evaluate to their values in the callers environment.