guile-devel
[Top][All Lists]
Advanced

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

Re: Suggestion for renamings


From: Dirk Herrmann
Subject: Re: Suggestion for renamings
Date: Thu, 18 Jan 2001 19:35:27 +0100 (MET)

[replied to guile-devel instead of guile-user]

On 18 Jan 2001, Ole Myren Rohne wrote:

> Dirk Herrmann <address@hidden> writes:
> 
> > I suggest the following renamings (i. e. deprecating the previous names):
> > 
> > SCM_MOST_POSITIVE_FIXNUM --> SCM_FIXNUM_MAX
> > SCM_MOST_NEGATIVE_FIXNUM --> SCM_FIXNUM_MIN
> > 'most-positive-fixnum    --> 'fixnum-max
> > 'most-negative-fixnum    --> 'fixnum-min
> > 
> > These names fit better in the naming scheme that is used in limits.h. 
> 
> most-positive-fixnum and most-negative-fixnum fits perfectly with the
> naming scheme used in Common Lisp. One could argue for keeping them
> for consistency with other CL-isms like the logxxx-family.

Thanks for pointing this out.  Hmmm.  On the C level at least, it seems
nicer to use the limits.h style names like LONG_MAX and friends,
especially since we are already defining SCM_CHAR_BIT and some more.
SCM_MOST_POSITIVE_FIXNUM is just clumsy (IMO).  However, if used in common
lisp, it may make sense to keep 'most-(posi|nega)tive-fixnum, but I have
to admit that I don't like these names.  Maybe 'max-fixnum is better than
'fixnum-max, but 'most-positive-fixnum is just ugly :-)

It should, BTW, be noted that uses of these identifiers on the scheme
level are suspicious:  It only makes sense when writing test cases for
libguile or in cases where algorithms require extreme performance fine
tuning (and I bet that most people that try to do this using
'most-positive-fixnum or such would be better off by looking for other
means of code optimization - there are exceptions, though).

With respect to CL-compatibility:  It's easy to provide CL-style
definitions in dedicated compatibility modules.  Is that an option?  If
so, I would suggest to use the renamings as described above, (but
rather use 'max/min-fixnum instead of 'fixnum-max/min for the scheme level
definitions) and put CL-isms into a separate module.

Best regards,
Dirk Herrmann




reply via email to

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