function handles & dispatch

David Bateman dbateman at dbateman.org
Thu Jun 25 01:59:28 CDT 2009


Jaroslav Hajek wrote:
> On Tue, Jun 23, 2009 at 3:38 PM, John W. Eaton<jwe at octave.org> wrote:
>   
>> On 23-Jun-2009, Jaroslav Hajek wrote:
>>
>> | scanning the Matlab online docs, I found this paragraph in the section
>> | on function handles:
>> |
>> | For nonoverloaded functions, subfunctions, and private functions, a
>> | function handle references just the one function specified in the
>> | @functionname syntax. When you evaluate an overloaded function by
>> | means of its handle, the arguments the handle is evaluated with
>> | determine the actual function that MATLAB dispatches to.
>> |
>> | I don't think Octave currently does this - only functions are looked
>> | for, and the function is fixed once the handle is evaluated. Can
>> | anyone verify this is true in Matlab? Should we change the behavior to
>> | be Matlab compatible?
>>
>> Yes, we should probably try to fix this.  Beware of US patent #6857118.
>>
>>     
>
> Huh? What, it's patented? Does it mean we shouldn't implement it? My
> idea was to change the octave_fcn_handle class to do a lookup by args,
> and possibly pre-cache some information to handle faster functions
> that are not overloaded. I think this is the "obvious to an expert in
> the field" kind of stuff.
>
> regards
>
>   
Function  handles or pointers to functions have existed in C from the 
very begin.. X11 GC graphic contexts are full of them and have been for 
the last 25 years.. I would think this patent would be hard to defend 
from a prior art point of view


D.



-- 
David Bateman                                dbateman at dbateman.org
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)



More information about the Octave-maintainers mailing list