Is this reasonable?
Brad Anderson
eco at gnuk.net
Thu Dec 5 14:44:33 PST 2013
On Thursday, 5 December 2013 at 19:36:46 UTC, H. S. Teoh wrote:
> On Thu, Dec 05, 2013 at 03:47:27PM -0300, Ary Borenszweig wrote:
> [...]
>> Cough, cough, make array length be an int.
>>
>> Do you really need arrays that big? :-S
>>
>> (I'm talking to Mr. D Compiler here)
>
> A negative length array makes no sense.
>
> Plus, being a systems language, D should be able to represent
> an entire
> 64-bit address space as an array of ubytes (even if this is
> rarely
> done!). If one were to write a kernel in D, it would be
> laughable to use
> signed array lengths.
>
>
> T
Chandler Carruth of LLVM fame (also on the C++ ISO Committee)
said during Going Native (it was either his talk or the panel, I
can't remember which unfortunately) that C++'s decision to make
size_t unsigned was a big mistake and you should almost always
use signed integers unless you need two's complement arithmetic
for some weird reason. I can't remember the entire rationale for
this though.
http://channel9.msdn.com/Events/GoingNative/2013/The-Care-and-Feeding-of-C-s-Dragons
http://channel9.msdn.com/Events/GoingNative/2013/Interactive-Panel-Ask-Us-Anything
More information about the Digitalmars-d-learn
mailing list