diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-02-22 18:52:04 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-02-22 18:52:04 -0800 |
commit | 5c591d3aaf1e98f415a594d57eb46955342aee79 (patch) | |
tree | 2fcc56b137f6a051a1b5514ff174841181cf4ef6 | |
parent | 63293b51c606935da9b1b839b5573f71f2c8df85 (diff) | |
download | txr-5c591d3aaf1e98f415a594d57eb46955342aee79.tar.gz txr-5c591d3aaf1e98f415a594d57eb46955342aee79.tar.bz2 txr-5c591d3aaf1e98f415a594d57eb46955342aee79.zip |
doc: add rationale about let vs let*.
* txr.1: Add Rationale: section to let and let* clarifying
that the decision to make let parallel is for compatibility
with other dialects like ANSI CL and Elisp.
-rw-r--r-- | txr.1 | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -15276,6 +15276,28 @@ closures, but are captured in delimited continuations. (let (:a nil)) -> error, :a and nil can't be used as variables .brev +.TP* "Rationale:" + +\*(TL follows ANSI Common Lisp in making +.code let +the parallel binding construct, and +.code let* +the sequential one. In that language, the situation exists for historic +reasons: mainly that +.code let +was initially understood as being a macro for an immediately-called +.code lambda +where the parameters come into existence simultaneously, receiving the +evaluated values of all the argument expressions. The need for sequential +binding was recognized later, by which time +.code let +was cemented as a parallel binding construct. +There are very good arguments for, in a new design, using the +.code let +name for the construct which has sequential semantics. +Nevertheless, in this matter, \*(TL remains compatible with dialects like +ANSI CL and Emacs Lisp. + .coNP Operator @ progv .synb .mets (progv < symbols-expr < values-expr << body-form *) |