A question for you all: size_t or unsigned int

Paul Harris paulharris at computer.org
Thu Nov 13 12:24:53 UTC 2008


2008/11/13 martin f krafft <madduck at debian.org>

> also sprach Paul Harris <paulharris at computer.org> [2008.11.13.1302 +0100]:
> > that way, the same code will "scale up" from an 8 bit microcpu up
> > to the 64 bit gorillas
>
> Yes, so the question is whether we want/need this. Once you start to
> serialise/archive/save kdtrees, you are making it unnecessarily
> difficult. unsigned int should be enough for everybody, no? :)
>

Maybe, maybe not.  I would love to be able to build a kdtree and store it in
a vector<> rather than heaps of linked pointers to small allocated nodes...
if that happens then we would be serializing vectors, whose size is defined
by size_t

But, I agree with your arguments, at this point we don't need anything
bigger than an unsigned int (AFAIK), so why jump to size_t

I suppose the question is would we ever want to move to size_t ? If so then
we may as well make the leap now.  kdtree already currently uses size_t in a
lot of places, so we technically would be going backwards if we switched to
unsigned int.


>
> (or maybe this should be a #define-able option?)
>
>
Heh... maybe, but I'd rather just give people the choice if there is
evidence that someone would ever want to make that choice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/libkdtree-devel/attachments/20081113/aa2cd414/attachment.htm 


More information about the libkdtree-devel mailing list