D arithmetic problem
    neob 
    neobstojec at gmail.com
       
    Thu Jun  4 06:20:03 PDT 2009
    
    
  
> In mathematical usage, an 'integer' is signed. So the 'u' prefix makes 
> sense. However, 'byte' is not 'byte int'. And the word 'byte' does NOT 
> have an implied signed-ness in popular usage (in fact, it doesn't have 
> terribly much implied connotation of being a number, merely a set of 8 
> bits).
Then maybe byte and ubyte should be replaced by tiny and utiny. It would eliminate confusion about byte and it wouldn't go against "without a u is signed, with a u is unsigned" convention. You would only have to add 
static if (is(utiny))
{
	alias tiny byte;
	alias utiny ubyte
}
to older code. byte_t alias for utiny could be added to the language.
    
    
More information about the Digitalmars-d
mailing list