sperber(a)informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor]) writes:
>> a) Add them as another datatype comletely separate from
Elisp
>> fixnums, with explicit coercions back and forth.
>>
>> This, I believe, is possible with minimal changes to the Elisp
>> machine, even though it's still a sufficiently hairy job, 'cause
>> you need to interface with the garbage collector in a suitable
>> way.
Hrvoje> Not hairy at all. Have you looked at
Hrvoje> DEFINE_LRECORD_IMPLEMENTATION? It allows you to specify a
Hrvoje> callback routine for the GC.
I wasn't thinking about tracing, but rather about the fact that
(according to my totally naive view of how efficient bignum
arithmetic works), with some bignum operations, it may not be
possible to know the size of the result without actually computing
it.
I still don't understand the problem. Even if it is true that the
size of the resulting number is unknown (and I am not convinced in
this!), you are still quite free to use realloc() and friends to
adjust the size incrementally.
For example, can you shrink an object after creating it?
What kind of object, and why would you want to do this?
--
Hrvoje Niksic <hniksic(a)srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
You have an unusual magnetic personality. Don't walk too close to
metal objects which are not fastened down.