Understanding and new language feature proposal

bearophile bearophileHUGS at lycos.com
Mon Jan 6 01:41:10 PST 2014


Sumit Adhikari:

> unsigned bits(179:0) a ;
> unsigned bits(179:0) b ;
> unsigned bits(179:0) result = a + b ;

What about this syntax:

UnsignedBits!(179, 0) a, b;
UnsignedBits!(179, 0) result = a + b;

Or better:

alias ubits = UnsignedBits!(179, 0)
ubits a, b;
ubits result = a + b;

Bye,
bearophile


More information about the Digitalmars-d mailing list