Is there any reason why arithmetic operation on shorts and bytes return int?

Walter Bright newshound2 at digitalmars.com
Fri Dec 14 00:39:04 PST 2012


On 12/13/2012 10:19 PM, H. S. Teoh wrote:
> This is cool, I've never thought of using alias this on a @property
> function. I'll have to start using that in my code. :-)

That's actually why I wrote it - as a "template" for how to do similar user 
defined types.


> The rest of the code is tl;dr, but I think it does showcase quite well
> the power of user-defined types in D. Now we just have to iron out
> implicit conversion from literals (and I mean that in general, not just
> for this particular example), and it will just be great.

Yup. Once all that works, I'd like to incorporate halffloat into Phobos.



More information about the Digitalmars-d mailing list