To Walter, about char[] initialization by FF

Unknown W. Brackets unknown at simplemachines.org
Sat Jul 29 19:18:54 PDT 2006


But even prior, this:

char c;
writefln(cast(size_t) c);

Would have given you 255, not 0.  This has been true for quite some 
time.  The fact that it did not happen for arrays in the same way was, 
as far as I know, a bug.  Actually, I didn't even realize that got fixed.

-[Unknown]


> "Walter Bright" <newshound at digitalmars.com> wrote in message 
> news:eagufo$2knt$1 at digitaldaemon.com...
>> Andrew Fedoniouk wrote:
>>> Element of UTF-8 sequence is an octet.  I think you should rename
>>> 'char' type to 'octet' if D/Phobos intended to support only UTF-8.
>> This was all hashed out years ago. It's too late to start renaming basic 
>> types.
> 
> I am not asking to rename anything.
> 
> Could you please just remove this weird 0xFF initialization
> for char arrays? ( as it was prior to .162 buld )
> 
> This is the whole point. If you will do this
> then current char type can be used for
> representation of single byte encodings as it stands -
> character.
> 
> Andrew Fedoniouk.
> http://terrainformatica.com
> 
> 



More information about the Digitalmars-d mailing list