octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incompatibility between Matlab and Octave with respect to function h


From: Juan Pablo Carbajal
Subject: Re: Incompatibility between Matlab and Octave with respect to function handles
Date: Sun, 18 Mar 2018 21:44:12 +0100

> "
> pseudo_anonymous_function = @afun
>
> pseudo_anonymous_function =
> function_handle with value:
> @afun
> "

It seems matlab delaying the check till the first time the handle will
be used. If we compare with python

x = myfun

will fail if myfun is not defined, but

x = lambda z: myfun(z)
will fail only when x is called. You can of course save to disk the
second expression and load it, and the fail will occur when the lambda
is used.

I think there have been quite some discussion about this in the
mialing list. I perosnally think that if you were able to save the
file you should be able to load it.
So function handles or anonymous functions should be checked at load
time (but this means they wont eb checked at creation time)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]