'int' is enough for 'length' to migrate code from x86 to x64
flamencofantasy via Digitalmars-d
digitalmars-d at puremagic.com
Fri Nov 21 05:43:08 PST 2014
On Friday, 21 November 2014 at 09:43:04 UTC, Kagamin wrote:
> C# doesn't encourage usage of unsigned types and warns that
> they are not CLS-compliant. You're going against established
> practices there. And signed types for numbers works wonders in
> C# without any notable problem and makes reasoning about code
> easier as you don't have to manually check for unsigned
> conversion bugs everywhere.
>
I don't want to be CLS compliant! I make very heavy use of unsafe
code, stackalloc and interop to worry about CLS compliance.
Actually one of the major reasons I am looking at D for
production code is so that I don't have to mix and match
Assembly, C/C++ with C#. I want the best of all worlds in one
language/runtime :).
Anyways, I believe the discussion is about using unsigned for
array lengths, not unsigned in general. At this point most people
seem to express an opinion - including me, and I certainly hope D
stays as it is when it comes to length of an array. I am not
convinced in the slightest that signed is the way to go.
More information about the Digitalmars-d
mailing list