[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55717] allow installation of a +pkg name reso
[Octave-bug-tracker] [bug #55717] allow installation of a +pkg name resolution hook for arbitrary lookup
Fri, 15 Feb 2019 14:16:40 -0500 (EST)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36
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
Severity: 1 - Wish
Priority: 5 - Normal
Item Group: Feature Request
Assigned to: None
Discussion Lock: Any
Operating System: GNU/Linux
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:
Message sent via Savannah
|[Prev in Thread]
||[Next in Thread]|
- [Octave-bug-tracker] [bug #55717] allow installation of a +pkg name resolution hook for arbitrary lookup,
Mike Miller <=