[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
define and set! with multiple-values
- To: info-dylan@cambridge.apple.com
- Subject: define and set! with multiple-values
- From: Jonathan Bachrach <Jonathan.Bachrach@ircam.fr>
- Date: Thu, 31 Dec 1992 16:37:35 +0100
I propose to extend `set!' and `define' to allow accomodate
multiple-values. The syntax would be:
(set! place-1 place-2 ... new-value) => new-value
which could be translated into:
(bind ((tmp-1 tmp-2 ... new-value))
(set! place-1 tmp-1)
(set! place-2 tmp-2)
...
(values tmp-1 tmp-2 ...))
an example would be:
? (set! x y (location window))
10
20
?
Along these lines I also propose to extend define to accomodate
multiple-values as follows
(define variable-name-1 variable-name-2 ... initial-value) =>
(values variable-name-1 variable-name-2 ...)
Of course I propose to allow variable-name-k to include a type
declaration as in:
? (define (x <integer>) (y <integer>) (location window))
x
y
?
This extension is completely backward compatible with the current
Dylan specification.
-- jonathan bachrach
IRCAM
31, rue Saint-Merri
F75004 Paris, France
011-33-1-44784096
bachrach@ircam.fr