Change the lookup rules such that a failed lexical lookup is not treated like
an exception, but is
rather transformed into a method invocation on self (cfr. Newspeak by Gilad
Bracha). The advantage
there is that a) if you ‘forget’ the self, the method will still be invoked
b) there is more opportunity
for moving code in between lexical and dynamic scope without changes in calling
code. Lexical
scope still has precedence over dynamic scope! This means that we still
maintain the “security”
advantage that if the identifier is lexically visible, it will be that
identifier that will be found, and no
dynamic child can override this behaviour.
See also:
On the Interaction of Method Lookup and Scope with Inheritance and Nesting:
http://dyla2007.unibe.ch/?download=dyla07-Gilad.pdf
Original issue reported on code.google.com by tvcut...@gmail.com on 16 Sep 2008 at 2:10
Original issue reported on code.google.com by
tvcut...@gmail.com
on 16 Sep 2008 at 2:10