unsigned policy (implicit conversions for complex?)

Walter Bright newshound at digitalmars.com
Mon Feb 12 18:59:49 PST 2007


Derek Parnell wrote:
> On Mon, 12 Feb 2007 16:03:14 -0800, Andrei Alexandrescu (See Website For
> Email) wrote:
> 
>> http://erdani.org/d-implicit-conversions.pdf
>  
>> Did I forget something?
> 
> Characters are not numbers. 

That's an enticing point of view, and it sounds good. But Pascal has 
that view, and my experience with it is it's one of the reasons Pascal 
sucks.

Examples:

1) converting text <=> integers
2) converting case
3) doing compression/encryption code
4) using characters as indices (isspace() for example)

Take away the implicit conversions, and such code gets littered with 
ugly casts.



More information about the Digitalmars-d mailing list