Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



In 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/

[2] https://feb.kuleuven.be/public/u0003131/WBT23/wxMaxima/wxM_i...

[3] 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


Is 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.


The implementation of the if() function would be the one that calls eval() on the true or false code block.


Lambda is a special form


I 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: