[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Terminology question
From: |
Stefan Monnier |
Subject: |
Re: Terminology question |
Date: |
Wed, 27 Apr 2016 08:46:42 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> A "form" is a piece of data in Lisp that represents a program, meaning it can
> be evaluated without error.
I'd rather agree with Richard that the issue is not whether it can be
evaluated without error, but whether it is intended for evaluation.
E.g. if you consider
(let ((x 1)) (+ x 4))
and
(1 2 3 4 5)
both of those objects are sexps (which I take to mean "the abstract
representation of structured data"), and might be treated as "nothing
more than sexps" (i.e. as data).
Given their shapes, if I had to guess, I'd say that the first is likely
to be a form while the second is likely not to be a form.
This is very closely related to the difference between XML and HTML:
Ignoring the info you get from the namespacing, which basically gives
you a hint about the intention, any XML tree can be considered as
a (potentially invalid) HTML document. So "sexp" is basically the same
as "XML", and "form" corresponds to "HTML".
Stefan