https://issues.dlang.org/show_bug.cgi?id=14832

Steven Schveighoffer <schvei...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|Windows                     |All

--- Comment #4 from Steven Schveighoffer <schvei...@yahoo.com> ---
(In reply to Walter Bright from comment #2)
> To me this looks invalid. I see no reason to support creating arrays from
> ulongs.

You mean from ranges with ulong length? I don't see why. ulong[] is a valid
type, and a reasonable request. How do I make a ulong[] from iota on 32-bit?

(In reply to Dmitry Olshansky from comment #3)
> Also the funny thing is that
> https://github.com/D-Programming-Language/phobos/pull/3544
> 
> adds support for ulong length which AFAIK only iota on ulong give and
> BECAUSE the element type is ulong.sizeof == 8 bytes long nobody will ever be
> able to call array on > ~512 million long iota. 

The point is not to make arrays of larger than size_t elements, the point is to
make arrays out of small ranges that happen to use ulong as a length.

> So all of that effort is leading nowhere, just drop the ulong length please.

You mean from iota? or support from array? Why should a range that has a ulong
length of 10 be disallowed?

Note that a file may have ulong length even on a 32-bit system. This would mean
creating an array out of a file stream range (that reasonably supplies a ulong
length) would be disallowed, even when the length is small.

I really don't understand the objections here, this code is very reasonable. It
means code that makes sense on both 32-bit and 64-bit systems fails on 32-bit
systems.

--

Reply via email to