short for "S-Expression" [L1 ] (S stands for symbolic).
The defining RFC-draft: http://theory.lcs.mit.edu/~rivest/sexp.txt Rivest's SEXP page: http://theory.lcs.mit.edu/~rivest/sexp.html
Zarutian is half in love with the canonical form because of ease of parsing.
Lars H is more sceptic. Syntactically, plain old Tcl lists are much simpler and more readable.
Zarutian: but is it as easily parsed by programs that dont have an embedded Tcl interpreter?
Lars H: Well,
Comparing Tcl lists and SEXPs may be intructive in explaining some fundamental differences between Tcl and LISP. The following is a SEXP
(abc (de #6667#) "ghi jkl")
and this is the corresponding Tcl list
abc {de \x66\x67} "ghi jkl"
Some useful observations are:
A Tcl-native encoding of a list of SEXPs as above could be as a list where even elements are types and the odd ones the corresponding values. Then the above example would be
list {"" abc list {"" de "" fg} "" {ghi jkl}}
if one writes "" for the empty type specifier. (The RFC-draft above also allows for every base string to carry a "display hint" prefix, which looks like "[image/gif]". That effectively means every non-list has a type tag, even though one normally omits it.)