type of concatenated arrays

Reiner Pope some at address.com
Wed Nov 7 15:52:13 PST 2007


Janice Caron wrote:
> Whoops!
> 
> Thanks for the correction. My apologies.
> 
> Well, one other possible explanation I can think of is that, if
> concatenation were to produce a mutable result then (for example)
> 
>     tolower(a~b)
> 
> wouldn't compile, because the argument to tolower() needs to be
> invariant. That's kind of a lame argument though.

This problem keeps occurring, because we have no way within the language 
te express the property, "this array is unique" -- which would mean it 
can be used as invariant or mutable as you desire. A number of people 
have suggested a unique type qualifier at different times, although I'm 
not sure if anyone has defined a semantics for unique types, so that 
they are guaranteed to be unique.

    -- Reiner



More information about the Digitalmars-d mailing list