Tidy auto [Was: Re: @disable]
bearophile
bearophileHUGS at lycos.com
Sun Jan 17 21:10:40 PST 2010
Walter Bright:
> Andrei introduced me to that style, and I'm starting to use it more and
> more. I like it for the reasons you state.
I'm not using it because I'm not using D2 much yet, but I have read that a good number of people are adopting that style in other languages as Scala, so it can be a good way to program (I can appreciate it myself). If this is true then a syntax like:
auto immutable x = y * 2;
can be seen as too much long and boring to write all the time, so the "immutable" keyword may need to be changed again :-) For example into "val" (also as "retard" has said), so it becomes shorter (here "auto" is present if and only if the programmer wants type inference, as I have written in other posts, to clean up its semantics):
auto val x = y * 2;
Bye and thank you,
bearophile
More information about the Digitalmars-d
mailing list