unsigned policy (implicit conversions for complex?)

Derek Parnell derek at nomail.afraid.org
Wed Feb 7 16:12:25 PST 2007


On Thu, 08 Feb 2007 08:59:56 +0900, Bill Baxter wrote:

> Andrei Alexandrescu (See Website For Email) wrote:
>> http://erdani.org/d-implicit-conversions.pdf

What is the justification for character types to be implicitly converted to
integer types? For the same reason that arithmetic with booleans is
meaningless, so is such operations on characters. 

  int x = 'a' + 'z'; // Is meaningless.
  int y = cast(int)'a' + cast(int)'z'; // Is now purposeful.

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Justice for David Hicks!"
8/02/2007 11:09:42 AM



More information about the Digitalmars-d mailing list