namgk / ambienttalk

Automatically exported from code.google.com/p/ambienttalk
0 stars 0 forks source link

Converting lexical lookup into dynamic (object scope) lookup #23

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
it does prohibit static scoping (lexical addressing)

Original comment by tvcut...@gmail.com on 25 Apr 2010 at 9:42

GoogleCodeExporter commented 8 years ago

Original comment by tvcut...@gmail.com on 25 Apr 2010 at 9:42