Array literals REALLY should be immutable

Walter Bright newshound1 at digitalmars.com
Thu Nov 12 11:46:29 PST 2009


Don wrote:
> Especially when it's creating an inconsistency with string 
> literals.


The inconsistency bothers me, too, but then there's the case:

    int x;
    ...
    [1, 2, x]

That can't be made immutable. Shouldn't it work? There's no analog for 
that for string literals, so the inconsistency isn't quite complete.



More information about the Digitalmars-d mailing list