Fexpr is somewhat orthogonal to a lazy / impatient assessment.
The usual approach to functions is to evaluate the arguments of a function and then call the result. Lazy eval still behaves like this, it just delays the evaluation until the parameter is used.
The usual macro approach is to pass unvalued arguments to a template that evaluates everything that is not quoted. The resulting AST fragment is introduced into the call area, where it is usually evaluated again. This works the same with lazy eval.
Fexpr's historically insane approach is to pass unvalued arguments to a function that does what they like. The result is entered directly into the call site and is usually not evaluated automatically.
fexpr is pretty close to arbitrary conversion. That way you can implement macros and lambda with them. You can also implement any hybrid of your desired / lazy grade you want. Similarly, you can implement fexpr, the default lazy eval and explicit calls to eval () in different places to force impatient behavior.
I do not think that I would characterize fexpr as a simple solution for implementing lazy eval, although in treatment it is worse than illness.
source share