This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: SCM_VALIDATE_...
- To: Dirk Herrmann <dirk at ida dot ing dot tu-bs dot de>
- Subject: Re: SCM_VALIDATE_...
- From: Jim Blandy <jimb at savonarola dot red-bean dot com>
- Date: 25 May 2000 17:52:09 -0500
- Cc: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>, Guile Mailing List <guile at sourceware dot cygnus dot com>, djurfeldt at nada dot kth dot se
- References: <Pine.LNX.4.21.0005251846270.5213-100000@marvin.ida.ing.tu-bs.de>
> If we plan to provide macros for the value oriented point of view we
> have to be careful: When goops is integrated, any value based predicate
> may be broken as soon as someone adds an additional representation for a
> certain class of numbers. Example: A goops class that represents inexact
> reals by using floats, in addition to the current representation as
> doubles. Suddenly we have a situation, where SCM_REAL_P and
> "real?" behave differently, except we add a call to the corresponding
> generic dispatch routine to the macro's definition.
>
> This is, obviously, a more general problem: The whole macro stuff (as it
> is now) will only work for a certain 'built in' set of representations for
> everything, except every macro is extended by the corresponding generic
> function call.
Clearly, SCM_REAL_P should be implemented by invoking a real? generic
function, which the module adding these new representations can
define...