Skip to content

Conversation

bhelyer
Copy link
Contributor

@bhelyer bhelyer commented Dec 12, 2011

This confuses people that don't understand that arrays are passed by value, even though they contain a reference.

@JakobOvrum
Copy link
Contributor

It would be nice to have this article on slices linked in the Articles section, so instances like this can be replaced with a link.

@schveiguy, you wrote this, if I'm not mistaken? What do you think?

@schveiguy
Copy link
Member

I think the whole memory article applies only to D1/phobos1, and is quite out of date. However, in that context, I would suggest saying "since the contents of the array are passed by reference".

I have committed in the past to adding my array article to the actual ddoc site in the section on articles. I just haven't done it yet (need to port all the TRAC wiki stuff to ddoc).

@JakobOvrum
Copy link
Contributor

I have another pull request (#45) which aims to bring it up to date with D2 and Phobos2. It doesn't fix all of it, but I aim to convert more of it in the future.

The purpose of the memory article itself has not been obsoleted, the fundamentals remain the same as before: D primarily uses GC for classes, but supports modeling your own allocation strategies, which the article exists to explain.

WalterBright added a commit that referenced this pull request Jan 15, 2012
Remove incorrect statement on array passing.
@WalterBright WalterBright merged commit 81225ca into dlang:master Jan 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants