On Tue, 09 Aug 2011 03:36:15 +0200, Mehrdad <[email protected]> wrote:
On 8/8/2011 4:50 PM, Andrej Mitrovic wrote:AFAIK it disallows you to escape a reference. `in` is actually const scope.So this heap allocation shouldn't be happening, right?
Yes and no. Disallowing that allocation would be an optimization not required by the language. Essentially, 'scope' in the parameter list is a limitation for the callee, not a guarantee for the caller. -- Simen
