|
From: | John W. Eaton |
Subject: | [Octave-bug-tracker] [bug #51688] support for "import" keyword |
Date: | Wed, 9 Aug 2017 15:00:55 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #9, bug #51688 (project octave): Rik: Symbols are just tree_identifier objects. That's all the parser creates for them. The final binding of a symbol doesn't happen until evaluation. It must be this way to handle changes in loadpath and other things that can happen dynamically. I think it should also be possible to do things like this: function foo (flag) if (flag) import pkg.*; end bar (); %% global function bar? pkg.bar? Who knows? end and the particular "pkg" that you get could further depend on the contents of the loadpath (there could even be more than one "+pkg" directory; which one you find depends on loadpath order). Mike: No, I haven't given that much thought. I would just be happy to have it working for Octave +packages. Meta comment: This language blows. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?51688> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |