[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disappointment



Sorry to have let you down, KMP.  I wasn't terribly serious about
adopting that BNF syntax; I merely put it forward as a logical
extension in the spirit of exploring the design space.  (At the
end of my note of 2 October, I said "May not be worth it?".)

Anyway, lest anyone misinterpret my opinions, let me say this:
(1) In general, when I say something *could* be done, I do not
    necessarily mean at all that it *should* be done.
    (As an example, the note of 2 Oct was clearly labelled
    a suggestion, not an exhortation.)
(2) In this specific case, I continue to support most strongly,
    as I have stated several times in the past, RMS' destructuring
    syntax.  It is general, encompassing both destructuring and
    binding of SETF'able things in one framework.  It is extensible,
    readily accommodating new kinds of destructuring because of
    the use of natural keywords (for example, using VALUES to
    handle multiple values).  For the simple cases of lists, the
    keywords can be made invisible by using backquote (which is
    a visual aid to tell you something odd is going on, so you
    don't have to count parentheses after the word LET):
	(LET ((`(,A ,B ,@C) '(1 2 3 4))) (LIST A B C)) => (1 2 (3 4))
    This also permits some syntactic variety:
	(LET (((VECTOR A B C) ...) ...) body)
    and (LET ((`#(,A ,B ,C) ...) ...) body)
    mean the same thing.
    Finally, there is no reason why macros cannot be allowed in the
    position of a variable in a LET for this purpose!  As long as they
    expand into a valid recognizable case, it can still work (just as
    for SETF).  So if I define
	(DEFMACRO FROBBOZ (A B C D) `(LIST ,A (VECTOR ,B ,C ,D)))
    then
	(LET (((FROBBOZ W X Y Z) ...)) body)
    makes perfect sense.
    (This last example leads to the possibility that a macro might
    want to know which of *four* contexts it is expanding for:
    EVAL, COND, PROGN, or SETF.  Oh, well.)

Anyway, *that* is my current and consistent opinion.
Revelation 22:18-19 (but I don't mean to be pompous).