scope for array parameters

Benjamin Thaut code at benjamin-thaut.de
Tue Sep 4 13:19:55 PDT 2012


Am 04.09.2012 22:18, schrieb Alex Rønne Petersen:
> On 04-09-2012 22:13, Benjamin Thaut wrote:
> This is already what scope does today. See http://dlang.org/function.html:
>
> "references in the parameter cannot be escaped (e.g. assigned to a
> global variable)"
>
> It's just that the compiler doesn't actually enforce it fully.
>

Does the compiler already use this information to optimize array literals?

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d mailing list