Alternative formulations of keywords
John Cowan
(11 Apr 2006 22:35 UTC)
|
Re: Alternative formulations of keywords
Marc Feeley
(12 Apr 2006 01:58 UTC)
|
Re: Alternative formulations of keywords
John Cowan
(12 Apr 2006 02:54 UTC)
|
Re: Alternative formulations of keywords
Per Bothner
(12 Apr 2006 03:05 UTC)
|
Re: Alternative formulations of keywords
John Cowan
(12 Apr 2006 03:12 UTC)
|
Re: Alternative formulations of keywords
Eli Barzilay
(12 Apr 2006 03:17 UTC)
|
Re: Alternative formulations of keywords
Eli Barzilay
(12 Apr 2006 03:20 UTC)
|
Re: Alternative formulations of keywords
John Cowan
(12 Apr 2006 03:27 UTC)
|
Re: Alternative formulations of keywords
Per Bothner
(12 Apr 2006 03:20 UTC)
|
Re: Alternative formulations of keywords
Marc Feeley
(12 Apr 2006 04:20 UTC)
|
Re: Alternative formulations of keywords
John Cowan
(12 Apr 2006 04:32 UTC)
|
Re: Alternative formulations of keywords
Marc Feeley
(12 Apr 2006 05:11 UTC)
|
Re: Alternative formulations of keywords
John Cowan
(12 Apr 2006 12:16 UTC)
|
Re: Alternative formulations of keywords
Eli Barzilay
(12 Apr 2006 12:29 UTC)
|
Re: Alternative formulations of keywords
Marc Feeley
(12 Apr 2006 13:07 UTC)
|
Re: Alternative formulations of keywords
John Cowan
(12 Apr 2006 13:36 UTC)
|
Re: Alternative formulations of keywords
Marc Feeley
(12 Apr 2006 14:25 UTC)
|
Re: Alternative formulations of keywords
John Cowan
(12 Apr 2006 14:28 UTC)
|
Re: Alternative formulations of keywords Marc Feeley (12 Apr 2006 14:57 UTC)
|
Re: Alternative formulations of keywords
John Cowan
(12 Apr 2006 16:26 UTC)
|
Re: Alternative formulations of keywords
Per Bothner
(12 Apr 2006 16:49 UTC)
|
Re: Alternative formulations of keywords
John Cowan
(12 Apr 2006 16:56 UTC)
|
Re: Alternative formulations of keywords
Eli Barzilay
(12 Apr 2006 13:37 UTC)
|
Re: Alternative formulations of keywords
Marc Feeley
(12 Apr 2006 04:54 UTC)
|
Re: Alternative formulations of keywords
John Cowan
(12 Apr 2006 16:07 UTC)
|
On 12-Apr-06, at 10:28 AM, John Cowan wrote: > Marc Feeley scripsit: > >> 1) find an alternative mechanism that avoids the need for keyword >> objects (i.e. you view foo: as a symbol and want to keep it that way) > > Yes, though I am obviously okay with allowing such symbols to be > self-evaluating. > >> 2) find an alternative mechanism that avoids the proposed parameter >> list syntax (with #!key, etc) > > No, although I don't consider this essential, since my approaches > all involve a standardized run-time representation. > >> 3) find an alternative implementation of the SRFI (i.e. you are OK >> with the specification) > > No. OK, then please explain why in your proposal #2 the compiler needs to transform: (foo 'bar foo: 32 bar: 54) into: (foo 'bar (list (cons foo: 32) (cons bar: 54))) For your purposes, wouldn't it be sufficient to use a rest parameter in the definition of foo and parse that in foo? (define (foo a . rest) (let ((optionals (alistify rest))) ...)) Note that this is what the reference implementation of SRFI 89 does. Then there is no need for the compiler to treat keywords specially (except they need to be self evaluating). Also, consider the function definition: (define (f a b #!key (y 11) (z 22)) ...) and the call: (f x: 33 z: 44 y: 55) In this case, I want parameter a to be bound to x: and b to be bound to 33. I don't see how this would work with your proposals. In summary, I fail to understand which problem you are trying to solve with proposal #2. I also don't understand proposal #3. Marc