[Issue 13084] ModuleInfo.opApply delegate expects immutable parameter

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jul 13 03:07:51 PDT 2014


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

--- Comment #13 from Kenji Hara <k.hara.pg at gmail.com> ---
(In reply to Walter Bright from comment #12)
> (In reply to Kenji Hara from comment #11)
> > I don't think it's good idea. It would introduce confusing than benefits.
> 
> Please explain. What confusion?

All D programmers would assume that unqualified type name T is a mutable type,
and const(T) is const, immutable(T) is immutable.

But, the proposed idea will break the assumption - all ModuleInfo,
const(ModuleInfo), immutable(ModuleInfo) will be same immutable. it's very
confusing situation.

--


More information about the Digitalmars-d-bugs mailing list