[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: function handles & dispatch
From: |
Jaroslav Hajek |
Subject: |
Re: function handles & dispatch |
Date: |
Wed, 24 Jun 2009 09:06:37 +0200 |
On Tue, Jun 23, 2009 at 3:38 PM, John W. Eaton<address@hidden> 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
--
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz