Ranges longer than size_t.max
Peter Alexander
peter.alexander.au at gmail.com
Fri Dec 28 18:21:18 PST 2012
On Saturday, 29 December 2012 at 02:14:22 UTC, Jonathan M Davis
wrote:
> On Saturday, December 29, 2012 02:18:36 Peter Alexander wrote:
> I'd be very strongly inclined to go with #4 and just say that
> anyone who
> actually cares about numbers that large should use 64-bit.
> Needing ranges of
> length greater than uint.max is definitely not the norm, and I
> would expect
> people caring that much about computational stuff to be using
> 64-bit anyway,
> since odds are they'll need the memory. Allowing for length to
> be anything
> other than size_t is extremely annoying for generic code.
Sorry, I don't think I was clear on what the issue is.
I'm already assuming 64-bit. What I'm saying is that 64-bit
sometimes isn't even enough (for example in the case of a
permutations range). I'm asking if allowing length to return
BigInt would be reasonable.
More information about the Digitalmars-d
mailing list