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

Re: vote on destructuring



I am definitely in favor of including destructuring
in LET, DEFUN, and whatever contexts it is appropriate in.
In fact, I think it would be a win if this were extended
to provide full pattern-matching (for example, like Act 1 -
I have a set of Lisp macros that essentially do this).
There should be a way for the user to define new patterns
by putting a property on a symbol which names the pattern.

I would prefer that a list used as a pattern mean to bind
the elements of the list to the elements of the pattern, 
rather than RMS's suggestion that they bind multiple values
to elements of a pattern. I'd rather have a special pattern
say, called VALUES for that. 

In general, I'd like to see a reduced dependence on multiple
values, and I'd rather not have system functions return
multiple values. First, transportability to other Lisp
dialects suffers, but I agree that's a secondary
consideration.  More importantly, I think there are still
some instances where multiple values are not smoothly
integerated into the system (on LispM, and I assume MacLisp
too). For instance, I have been screwed by things like the
fact that if you write (PROG1 (FUNCALL SOME-FUNCTION)
(OTHER-CRUFT) ...)  without being aware that SOME-FUNCTION
may return multiply, the construct isn't as transparent as
you think it might be, and so on.