3 ms·
> A long time ago, a small language made the rounds by not evaluating expressions when they appeared, but when they were needed. > Lisp did this a long time ag
by chewxy 7y ago
> A long time ago, a small language made the rounds by not evaluating expressions when they appeared, but when they were needed.
> Lisp did this a long time ago, and now most languages are getting it too.
I'm not sure if this is correct. You can probably write a macro for lazy eval, but by default lisp is a CBV almost-lambda calculus.
Or you could pass around quoted things, I guess
- phoe-krk 7y agoF-expressions were a thing back in the day. https://en.wikipedia.org/wiki/Fexpr https://en.wikipedia.org/wiki/Fexpr Possibly the closest thing available in Common Lisp are Lisp macros - they receive their arguments unevaluated, and are free to utilize that input for further computation.
- chewxy 7y agoTIL. I only came across fexprs briefly on LtU once and never looked more into it. Thank you.