[Issue 13084] ModuleInfo.opApply delegate expects immutable parameter

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jul 18 03:08:49 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13084

--- Comment #26 from Dicebot <public at dicebot.lv> ---
> In your code, you can have such aliases. But don't add such alias in standard library code. It will introduce much limited situation than benefits.

This is just your preference, there is nothing standard about it. Such solution
is introduced exactly to impose limits and make using unqualified type harder.
Forcing certain type to be always used as immutable is not unheard of which
also means that you don't normally need const version of same type - because,
well, it is always meant to be immutable.

On actual topic: is there any reason why ModuleInfo itself needs to be
immutable and marking all its data members is not enough? That should still
make all the the options from PR #790 valid or am I missing something?

--


More information about the Digitalmars-d-bugs mailing list