Segment violation (was Re: Why I could not cast string to int?)

Daniel Murphy yebblies at nospamgmail.com
Fri Feb 3 18:50:02 PST 2012


"bearophile" <bearophileHUGS at lycos.com> wrote in message 
news:jgi3jn$2o6p$1 at digitalmars.com...
> I'd like to ask this to be valid, to shorten my code:
> alias immutable imm;
> Is this silly?
>

Yes =)

immutable might be more characters than you want to type, but at this point 
it's extremely unlikely it will be changed or a synonym will be added.

You can always define something like this:

template imm(T) { alias immutable T imm; }

imm!int cantchangethis = ...; 




More information about the Digitalmars-d-learn mailing list