dcollections 1.0 and 2.0a beta released

Ellery Newcomer ellery-newcomer at utulsa.edu
Sat May 22 08:15:41 PDT 2010


On 05/22/2010 06:28 AM, bearophile wrote:
> Pelle:
>> Yes, it works, but it doesn't gain anything from it, which is what I
>> said. :)
>
> Then what you have said was useless.

No it isn't. The point Pelle was making is that there are three use 
cases for parameter passed arrays:

1. read-only (corresponds to const)
2. read/write + resizing/reallocation (corresponds to ref)
3. read/write, no resizing (corresponds to no modifier)

With (1) and (2), if I see those modifiers in the signature, I can 
deduce the use of the array.

With (3), I can't really tell from the signature if the programmer meant 
that use case or forgot something, but the case is valuable enough that 
it should be enforceable.

With associative arrays, case (3) is rare (is it even possible?) to the 
point that it can drop out of consideration.


More information about the Digitalmars-d-announce mailing list