ncsa / qdl

the QDL programming language
Other
1 stars 0 forks source link

Add this and possibly super as reserved namespace aliases? #23

Closed jjg-123 closed 1 year ago

jjg-123 commented 1 year ago

Currently there is no good way to restrict where certain functions and variables are resolved. I propose that this and possibly super be added, so that the following works

    module ['a:/c','c']
    body [
         n(x)->5; 
         nn(x)->#n(x)+this#n(x); // #n means built-in, top level, this#n means defined in this scope.
     ];
 module_import('a:/c');
  c#nn(5)
[5,6,7,8,9]
jjg-123 commented 1 year ago

Won't fix. This was actually better solved by realizing that no qualification to the names resolve to the current scope.