Hacker News new | ask | show | jobs
by afranchuk 1609 days ago
Thanks for filling in the blanks. To clarify (hopefully): I think it's a bit odd to refer to fexprs as if they are an expression themselves. A language could potentially implement it as a flag on an expression to indicate how it should be evaluated, but normally one says that a language/expression has fexpr semantics, meaning that it is passed unevaluated forms.

If a language has fexpr semantics, you can for instance implement both macros and "normal" functions (among many other things) in very similar ways, since the only difference is that a normal function will first evaluate its arguments and then use the results of evaluation, whereas a macro may not do that (or may conditionally evaluate them!).

Hope that helps a little...

1 comments

The term FEXPR most likely refers to the fact that in the original LISP, a FEXPR is an interpreted function: it contains expressions which the interpreter must process. All the built-in functions in LISP which do the same thing are called FSUBR, and are written in machine language. For instance LET has a binding to a FSUBR, whereas a user-defined LET-like operator would be a FEXPR. While that adds a new construct to the language, it must itself be interpreted to evoke its semantics.