Fork me on GitHub

Does anybody know why the word “form” is used in “lisp form”? There are various other pieces of info that defines “lisp form” identically to “expression”. If that’s the case, then why weren’t “special forms” called “special expressions” instead? I’ve been curious about this for some time. Would really appreciate being pointed towards some resources that might explain the origin of the word choice.


Although that's the technical definition, I think most people use them interchangeably.


@tbaldridge thanks for that! So a “form” actually refers to the internal representation an interpreter has after the reader is done processing the expression?


yes, but if I saw one used in either situation I wouldn't bat an eye


Any idea why the word “form” was chosen? Is there some kind of historic reason? Or maybe a reason rooted in a field outside of CS? Just an interesting word choice if it’s actually referring to an AST.


a form is not an AST


1 is a form


Couldn’t a ast consist of a single item that represents the number 1?


ast nodes generally have a bit more information and overhead that the single value. A leaf node might just essentially be the value 1 but that's a pretty bare representation


A AST normally contains a bunch of compiler metadata in addition to the form itself.


brandon bloom has a playground for evaluators, ast,s etc at you can see what an ast for 1 looks like in his simple example: {:op :const, :value 1} and a more complicated form: (let [x 1 y 2] (+ x y))

{:op :let,
 :name x,
 :init {:op :const, :value 1},
 :expr {:op :let,
        :name y,
        :init {:op :const, :value 2},
        :expr {:op :call,
               :f {:op :ref, :name +},
               :args [{:op :ref, :name x} {:op :ref, :name y}]}}}


super neat stuff. stumbled on it last night and was reading and playing around


@odie You made me curious. McCarthy credits Alonzo Church with coining the term “form” in 1941 (!) to distinguish from a “function.” Check out part (c) of page 6 of this paper: