This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: interface reductions


On 24 May 2000, Mikael Djurfeldt wrote:

> BTW, three motivations for keeping keywords:
> 
> 1. They are in the IEEE Scheme standard (I think!)
> 
> 2. They are heavily used in GOOPS (and pretty convenient)
> 
> 3. A lot of people like them because they are self-evaluating

So, what is a typical use of a keyword (in comparison to using symbols
instead)?  And what does it mean that a keyword is self-evaluating?  I
tried the following:

guile> (define a 'a)
guile> a
a
guile> (a)
--> error as expected
guile> (define b (symbol->keyword 'b))
guile> b
#:b
guile> (b)
--> error

Sorry for my ignorance, but I'm really interested.  I promise to add
comments to keywords.h as soon as I get the idea :-)

Thanks
Dirk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]