https://issues.dlang.org/show_bug.cgi?id=12512
--- Comment #8 from [email protected] --- (In reply to Walter Bright from comment #7) > (In reply to monarchdodra from comment #6) > > Could we then allow "dup" to return "const(T)[]" for the cases where > > it can't return a mutable then? > > I suspect that would be considered surprising behavior. I guess it depends on how you consider "dup" to operate. Arguably, it could just be "duplicates the array. Strips the qualifiers it can, for convenience". Under such circumstance, it keeps its existing semantics, but is expanded to support more types than before. --
