yank unary '+'?

Justin Johansson no at spam.com
Mon Dec 7 09:00:26 PST 2009


Walter Bright wrote:
> 1. symmetry
> 2. compatibility with C and many other languages that use it
> 3. used with operator overloading to convert a user defined type to its 
> preferred arithmetic representation (a cast can't know what the 
> 'preferred' type is)
> 4. to create DSL languages, like Spirit, as Kenny points out
> 5. to coerce default integral promotion rules (again, cast(int) won't 
> always produce the same result)
> 6. to visually emphasize that a literal is positive
> 
> I say leave it in.

+vote



More information about the Digitalmars-d mailing list