Allow const/immutable for normal functions, inner functions and delegates?

Meta jared771 at gmail.com
Wed Feb 19 16:59:45 PST 2014


On Wednesday, 19 February 2014 at 22:20:45 UTC, John Colvin wrote:
> int ga = 1;
> const int gb = 2;
> immutable int gc = 3;
>
> int foo() immutable
> {
>     // reference to gc is legal
>     // any reference to ga or ba is an error
> }

Doesn't pure already do this?


More information about the Digitalmars-d mailing list