octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #51688] support for "import" keyword


From: Rik
Subject: [Octave-bug-tracker] [bug #51688] support for "import" keyword
Date: Wed, 9 Aug 2017 14:16:35 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Follow-up Comment #6, bug #51688 (project octave):

When a function is parsed, what sort of object is put in for a call to an
external function?  I'm trying to figure out whether something like "sin" is
converted to an executable object, in which case the overhead of checking the
import list only happens once when the function is parsed and is probably
okay.  Or does the symbol resolution happen every single time function is
evaluated, and perhaps more than that if the symbol like "sin" is used in a
for loop?

This is a hack, but I've been experimenting with "source".  This parses and
enters the function into the symbol table which then makes it available for
execution without the package/namespace qualifiers.  So "source
absolute_path_to_+package/myfcn.m" is roughly equivalent to "import
package.myfcn".  It does have some disadvantages.  It doesn't work for
classes, and it seems to make a command-line version of the function present
even in the base workspace.



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51688>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]