This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: guile bugs
Greg Badros <gjb@cs.washington.edu> writes:
> I was thinking about a C language feature that I call "branded typdefs"
> that seems to be more exactly what we want. e.g.,
>
> __branded__ typedef long SCM;
>
> Means that SCM is a long, but is a new type, not just a type alias. This
> would then require casts when a SCM is intended to be used as a long,
> and vice-versa. (Of course, this, like all the other solutions, will
> require inserting lots of casts into, e.g., numbers.c and the tags code).
BTW, Haskell uses the "newtype" keyword for this feature.
Carl Witty