|
From: | John W. Eaton |
Subject: | Re: refactoring function handle implementation for version 6 |
Date: | Thu, 11 Jun 2020 15:33:00 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |