[plt-scheme] keyword arguments (in v4.0, maybe)

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Wed Jun 13 05:28:46 EDT 2007

Robert Nikander skrev:
> On Jun 11, 2007, at 11:48 PM, Matthew Flatt wrote:
>>      (greet "John" #:last "Doe" #:hi "Howdy")
>>      (greet #:last "Doe" "John" #:hi "Howdy")
>>      (greet #:hi "Howdy" #:last "Doe" "John")
> Any interest in having an option to read symbols ending in ':' as 
> keywords? (like srfi 88)  I personally find this prettier and easier to 
> read.
> (greet "John" last: "Doe" hi: "Howdy")
> I'm imagining that we could turn it on/off with something like
> #reader-options ...
> at the top of a file?  That would preserve any existing code that used 
> symbols ending in ':'.

If two modules have conflicting exports it is fairly common to
import them like this:

   (require (prefix srfi: (lib "1.ss" "srfi"))

See for example the Galore source.

Jens Axel Søgaard

Posted on the users mailing list.