On Mon, 08 Nov 2010 19:04:40 +0100
Daniel Gibson <metalcae...@gmail.com> wrote:

> IMHO passing arrays to functions are really inconsistent in D2 anyway:
> static arrays are passed by value but dynamic arrays are passed by reference,
> but then again, as this thread shows, not really..

It may be better to have 2 kinds of "sequences", one having true value 
semantics (assignment & parameter passing also protect the content), the other 
true reference semantics (say, an array-list). Static arrays may just be 
considered as an additional hint to the compiler for possible optimization.
Or, have arrays implement true value semantics, but pass them as ref when 
needed. But then, we may sometimes need assignment not to copy...
What do you think?

Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com

Reply via email to