
Sept. 27, 2011
12:03 a.m.
Nick Coghlan wrote:
My proposed syntax is just a way to explicitly create new entries in that middle category - variables with local visibility and nonlocal lifetime.
I don't think that's the right way to characterise default argument values. While the *values* have nonlocal lifetime, the *name* being declared is a parameter, so both its scope and lifetime are local. Your proposal would be creating a new category of name that doesn't currently exist. I don't see how your proposal would do anything to clarify the distinction between visibility and lifetime. Currently, 'nonlocal' always refers to visibility. Your way, it would sometimes mean visibility and sometimes lifetime, with only a very obtuse clue as to the difference. -- Greg