bugGNU Octave - Bugs: bug #55717, allow installation of a +pkg name...

 
 

bug #55717: allow installation of a +pkg name resolution hook for arbitrary lookup

Submitter:  Mike Miller <mtmiller>
Submitted:  Fri 15 Feb 2019 07:16:38 PM UTC
   
 
Category:  Interpreter Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 15 Feb 2019 07:16:38 PM UTC, original submission:  

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.

Mike Miller <mtmiller>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only group members can vote.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2019-02-15 mtmiller Carbon-CopyRemoved 80942 -

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code