This is the mail archive of the 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: typedef void * SCM writes:
> > and doing appropriate casts everywhere.  I've changed lots of code
> > that did bitdiddling. You can review the patch up on my homepage, at
> >
> May I tell you that this is _very_ great news to hear?  Thank you very
> much for starting this important task!  However, some time ago there was 
> some discussion about whether void* would be the appropriate type to
> use.  Definitely, it is better than long (the current choice), but it
> became clear during that discussion, that an unnamed struct would be the
> best choice, because with a struct you can't by mistake do:
> SCM some_scm_bool;
> ...
> if (some_scm_bool) ...
> Thus, the following suggestion was made (the names of the macros could
> probably need some improvement :-), I just want to point out the idea):

I already talked about this to Jim and Maciej, but this is probably a
no-go. As you point out, passing structs around will affect
performance negatively, so a it would be a compilation-only feature.

I think that a compilation-only check will be too much work for a
developer. I for one, can't see myself using
-DGUILE_COMPILE_TIME_DEBUG_MODE on a regular basis, if it is an extra
action I have to consciously make during development.

> BTW: I think especially SCM_BITS should be replaced by something else,
> which can more easily be grepped.  Now you already get some entries with
> SCM_BITS.  What about SCM_CONTENT, or SCM_EXTRACT, or I don't
> know?  Native speakers?

I used SCM_AS_WORD for this; it is not only used for bit operations. 


Han-Wen Nienhuys, ** GNU LilyPond - The Music Typesetter 

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