Why are unsigned to signed conversions implicit and don't emit a

bearophile bearophileHUGS at lycos.com
Mon Apr 11 09:35:33 PDT 2011


Kagamin:

> bearophile Wrote:
> 
> > - C# uses sbytes, and ubytes. Enough said.
> 
> there's no ubyte in C#
> It has byte, and it's unsigned.
> 
> http://msdn.microsoft.com/en-us/library/exx3b86w.aspx

I was partially wrong, thank you. If you take a look it has int/unt, short/ushort, etc, but it doesn't have byte/ubyte, it has sbyte/byte. In my opinion here the naming symmetry has being broken because for most programmers bytes are unsigned. In D I have suggested sbyte/ubyte, but I accept the C# solution too.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list