[plt-scheme] Keyword args

From: Paul Schlie (schlie at comcast.net)
Date: Sat Oct 23 21:21:29 EDT 2004

I understand.

To me, 'x is clearly a shorthand for (quote x) as the quote ' both precedes
it's argument in both cases, and is clearly logically associated with the
symbol it's been pre-pended to.

However although :x 2 may be though of as shorthand for (: x 2), it doesn't
intuitively seem natural to presume it extends it's semantic influence
beyond the symbol it's been pre-pended to, as x: 2 seems to more intuitively
naturally indicate given it's traditional syntactic and semantic use. (which
is I guess why I find (procedure :x 3 :y 3) visually disturbing, as I  tend
to quickly parse as (( procedure :x) (3 :x) 3), which I know is not what was

Which may just be me,


> From: Eli Barzilay <eli at barzilay.org>
>> On Oct 22, Paul Schlie wrote:
>> [...]
>>  -but-please-not-
>> (some-function :x 1 :y 2)
> It is a very popular format for keywords, there is tons of code that
> will break if it is changed.
>> As for whatever reason, I still can't help finding it visually
>> disturbing, and contradicting my instinctive expectations of a colon
>> appearing between associated elements, prefixing the keyword just
>> doesn't feel reasonable.
> If you think about the ":" as a form of "'" (visually) then it does
> make sense.
> On Oct 22, Doug Orleans wrote:
>> How do you feel about this:
>> (some-function 'x 1 'y 2)
> The problem with this is that what you really want is a new type, not
> like other symbols.  (Or did you say this to make the same point I had
> above.)
> If mzscheme would have a simple reader syntax facility, I'd make
> Swindle turn `:foo' into something different than the symbol `'foo'.
> Actually, I think that it is hackable, maybe it's worth
> implementing...  (Obviously, that will break some amount of code
> too...)
> -- 
>           ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                   http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.