Growing a Language (applicable to @attribute design)

Walter Bright newshound2 at digitalmars.com
Wed Nov 14 02:43:10 PST 2012


On 11/14/2012 1:49 AM, renoX wrote:
> That's not strictly true: type inference works better for built-in types than
> for user-defined types, with "auto x = 1;" x is an int, how do I have the same
> type of syntax for MyInt?

You can have user-defined literals in D:

    auto x = MyInt(1);



More information about the Digitalmars-d mailing list