Alex Light wrote:
On Fri, Jun 17, 2011 at 9:26 AM, Nick Coghlan wrote:
atdef VAR=EXPR [, VAR=EXPR]* Such a statement would readily cover the speed enhancement, early-binding and shared state use cases for the default argument hack
Doing things this way however removes one of the chief benefits of the inject statement, the ability to create multiple versions of the same function with different sets of shared data.
Furthermore it gives the added benefit in that you can chose to run 'example' so that it uses a true global variable, instead of an injected one.
That answers my question about why you would want to inject into an already defined function.