[plt-scheme] keywords (a possible alternative?)

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Oct 2 00:03:53 EDT 2005

On Oct  1, Paul Schlie wrote:
> Personally I dislike colon prefix keywords, as to me colons tend to imply
> an association between elements, therefore a postfix positioning seems most
> visually natural (but of course subject to the same incompatibilities).
> 
> However, wonder if something along the line of:
> 
>  (function (: keyword expression) ...)
> 
> Might be both more syntactically consistent with the language; and
> enable keywords to be bound to argument expression lists, which a
> pre/post-fixed keyword association couldn't syntactically naturally
> support.

Either you do allow them to be first order values

  (let ([x (: key expr)])
    (foo x))

which will be even more inefficient, or you don't, which would make
them useful only as a compile-time mechanism.  (But like I said, this
is an orthogonal issue, and you you don't need keyword values to play
with the above.)


On Oct  1, Paul Schlie wrote:
> [...]

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.