Tidy auto [Was: Re: @disable]

bearophile bearophileHUGS at lycos.com
Sun Jan 17 07:20:10 PST 2010


dsimcha:
> What would this accomplish?  Everyone who's been using D for a while knows that,

It will help people that aren't using D for a lot of time yet, as I have said.


> If doing this were more verbose, i.e. if I couldn't just write:
> immutable y = 2 * x + 1;
> I might be less inclined to do this.

Is this too much long?
auto immutable y = 2 * x + 1;

If it's too much long, there are other ways to shorten it (require a syntax change):
var immutable y = 2 * x + 1;
Or:
immutable y := 2 * x + 1;

Bye,
bearophile



More information about the Digitalmars-d mailing list