guile-devel
[Top][All Lists]
Advanced

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

Re: typechecking


From: Han-Wen Nienhuys
Subject: Re: typechecking
Date: Wed, 26 May 2004 19:40:53 +0200

address@hidden writes:
> >
> >  What's the rationale for not allowing direct use in conditional
> >  tests?
> 
> Code like the following:
> 
> void f (SCM obj)
> {
>   if (obj) {
>     /* do something */
>   }
> }
> 
> is almost always wrong, since what the user typically wants to check is, 
> whether obj is SCM_BOOL_F or not:

It would be interesting to see if we could map the Scheme semantics
(true = !SCM_BOOL_F) to C. That would require mapping SCM_BOOL_F to
(void*)0x0. Is this desirable, and does anyone see a possibility for this?


-- 

 Han-Wen Nienhuys   |   address@hidden   |   http://www.xs4all.nl/~hanwen 





reply via email to

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