On Sunday, 12 May 2013 at 01:16:43 UTC, Simen Kjaeraas wrote:
I believe you're overthinking this. First, what is global unique variable? A unique value will per definition have to be thread-local (if not, other threads have a reference to it, and it's not unique). Thus, when passed to a function, the value is inaccessible outside of that function until it
returns. (I guess fibers might be an exception here?)

While in the function, that function can access a value both through the global variable which is supposed to be "unique" and through the lent parameter. This could cause problems because "unique" no longer means "unique", although it's difficult to see how serious that might be.

Reply via email to