octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #60237] Differente behaviour in anonymous func


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #60237] Differente behaviour in anonymous function handling
Date: Fri, 2 Apr 2021 13:15:39 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Update of bug #60237 (project octave):

                  Status:                   Fixed => Ready For Test         
             Open/Closed:                  Closed => Open                   

    _______________________________________________________

Follow-up Comment #27:

Re: comment #25: Another way of looking at it is that anonymous functions are
just another way of writing a nested function that have the following special
features:

The body of the function may contain only a single expression, no statements. 
In Matlab, assignments are statements while in Octave they are expressions. 
But in anonymous functions, Octave also disallows assignment expressions.

Unlike ordinary nested functions, anonymous functions also capture variable
values from the parent scope when the anonymous function statement is
evaluated.

But otherwise, they also capture the parent stack frame(s) just as handles to
nested functions do.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60237>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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