Inability to dup/~ for const arrays of class objects

Jakob Ovrum jakobovrum at gmail.com
Thu May 30 08:57:28 PDT 2013


On Thursday, 30 May 2013 at 14:36:23 UTC, Steven Schveighoffer 
wrote:
> The spec needs to be clarified.  I caution that the spec is 
> misleading in the article:
>
> -snip-

I agree that the slice/dynamic array distinction is important to 
make.

The vague, sometimes contradictory specification has done a lot 
of damage to beginners of D trying to learn about D's slices. In 
the IRC channel, helping beginners understand D's slices is a 
recurring theme. During the last year or so, there's been a trend 
to teach from the POV of making the distinction, and it helps *a 
lot*. The article now on the official website, which embraces the 
non-conflative way of reasoning about it, has been a valuable 
tool along the way.

There's a reason why such a big portion of the community has 
adopted this terminology even after we were all familiar with the 
conflation (it's because it's simply better).

I remember long ago there were even talks of separating slices 
and dynamic arrays in the type system of D2. It was too big a 
change too late, but the fact that this was considered so 
strongly by the community brings some background to the current 
debate.


More information about the Digitalmars-d mailing list