chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] problems with SRFI-10 implementation


From: Thomas Chust
Subject: Re: [Chicken-users] problems with SRFI-10 implementation
Date: Fri, 15 Oct 2004 19:16:12 +0200
User-agent: Mozilla Thunderbird 0.8 (X11/20040918)

felix winkelmann wrote:
[...]
I also defined a SRFI-10 reader constructor to go along with the record
printer and ran into the following problem:

Suppose you do this in csi:

#;4> (define-record blubb a b)
#;5> (define-reader-ctor 'blubb make-blubb)

Then

#;6> #,(blubb 1 2)
Error: illegal non-atomic object: #<blubb>

yields an error -- but why?


The creation of the blubb happens at *read-time*, and blubbs
aren't self-evaluating: you have to quote it:

'#,(blubb 1 2)

[...]

Oops, you're right. But this is very counter-intuitive, isn't it? In my eyes, every data object should evaluate to itself, because otherwise (like in this example) there are objects which cannot be evaluated at all! Well, it's probably more a question of taste...

cu,
Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]