Re: refactoring function handle implementation for version 6

"John W. Eaton" <[email protected]>
Newsgroups gmane.comp.gnu.octave.maintainers
Message-ID <[email protected]>
On 6/11/20 3:13 PM, Rik wrote:

> I doubt it gets used very much, but as long as Matlab has it, we could
> continue to support the behavior for strings and inline function objects
> alone, no need to extend to function handles.  You could put the
> vectorize.m in scripts/legacy and have it produce a warning when it is
> first used.  A prototype example is isdir.m in that directory.

OK, I'll do that.  It should be easy to also do it for anonymous 
functions: just check for function handle with class(), determine 
whether it is an anonymous function and get the text of the function 
body with functions().  Then apply the same transformation as we use for 
inline functions to that string, then return a new function handle 
constructed from that string.

jwe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.