This is the mail archive of the guile@sourceware.cygnus.com 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: Should logior (and friends) operate only on inums?


Maciej Stachowiak <mstachow@alum.mit.edu> writes:

> "Greg J. Badros" wrote:
> > 
> > It's now back to working on all unsigned longs (I never meant to change
> > it).  Bignums were never supported, and I won't be writing that patch
> > (and I'm not even convinced that that should be in the core, actually).
> 
> I don't think the logical math operations should be in the core in
> general, ultimately. But IMO there should be one version that does
> it generally in only one place. 

It's a tough call;  I think of some weighting between amount of code
that its add relative to its general utility.  For the long-number-based 
logical operations, the code amount is very small, and the general
utility is reasonably high.  For bignums, actual code needs to be
written (i.e., not just argument checking) and it's of less general
utility.  Thus, for bignum logical operations I'd not put them in the core.

> Would it make sense for `+' to support bignums, but not the version in
> the core?

Sure, as long as the generics stuff works.  OO programming is all about
being able to write related code in wildly different places (lexically)
and have that all DTRT.

Greg

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