Perhaps it would be less ambiguous if we turned const/immutable for
functions into annotations:

@const Foo bar(); //const function
@immutable Foo bar(); //immutable function
@immutable const(Foo) bar(); //immutable function with const return value
@const const(Foo) bar(); //const function with const return value
immutable(Foo) bar(); //mutable function with immutable return value
@immutable immutable(Foo) bor(); //immutable function with immutable
return value

But I'm not a big fan of "@", it clutters up source code.

Reply via email to