guile-devel
[Top][All Lists]
Advanced

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

Re: typechecking


From: Andy Wingo
Subject: Re: typechecking
Date: Sun, 30 May 2004 15:00:21 +0100

On Wed, 2004-05-26 at 19:40 +0200, Han-Wen Nienhuys wrote:

> 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?

I've been caught by this error a few times, and the scheme true/false
semantics do map nicely to C.

Howeverm the idea has some problems. For one, I don't think passing a
union to `if' (which is what SCM is in SCM_DEBUG_TYPING_STRICTNESS==2)
works.

Secondly, I might be bit-stupid, but after about five minutes of
looking, I can't find a nice set of tc3 type tags having #f==0 for which
a fast SCM_IMP can be defined. This hints that trying to do #f==0 is a
bad idea because it constrains the implementation.

Dunno, just my cent-and-a-half.
-- 
Andy Wingo <address@hidden>




reply via email to

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