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

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

[Octave-bug-tracker] [bug #55717] allow installation of a +pkg name reso


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #55717] allow installation of a +pkg name resolution hook for arbitrary lookup
Date: Fri, 15 Feb 2019 14:16:40 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?55717>

                 Summary: allow installation of a +pkg name resolution hook
for arbitrary lookup
                 Project: GNU Octave
            Submitted by: mtmiller
            Submitted on: Fri 15 Feb 2019 11:16:38 AM PST
                Category: Interpreter
                Severity: 1 - Wish
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

This is a feature request for something above and beyond what Matlab provides
in +pkg directories.

It is desirable to be able to create a +pkg namespace with programmable name
resolution. This would involve either a specially named m-file function in the
+pkg directory that Octave calls in special circumstances, or a C++ call into
the interpreter to register some kind of name resolution fallback function for
when a symbol is not found via the normal means.

If this is done with an m-file function (or oct-file function), the name
should be chosen to be sufficiently private to Octave to avoid conflict with
existing user code or Matlab code. Something with double underscores would
probably be best.

As a motivating example, I want to be able to provide a +py namespace with no
hard-coded m-file functions in it. Instead, any name that starts with "py."
will be passed to user code that will perform the name lookup and call a
function or return a reference to a data value.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55717>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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