octave-maintainers
[Top][All Lists]
Advanced

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

Re: undefined compound chaining behavior


From: Michael Goffioul
Subject: Re: undefined compound chaining behavior
Date: Tue, 10 Jun 2014 12:15:07 -0400

On Tue, Jun 10, 2014 at 11:58 AM, Hossein Sajjadi <address@hidden> wrote:
> Well, an assignment or any other _expression_ that has side effects is
> not referentially transparent, that's the way it is. Octave is not a
> functional language.
>

Yes, Octave is not a functional programming language, but as an
imperative language it is necessary to guarantee the order of
evaluation or define sequence point as c++ do. Also as a language
specially designed for mathematical computations such a behavior is no
acceptable.
Simply changing the manual and notice the user about behavior of
chaining without any theroretical backend(order of evaluation or
sequence point) does not resolve the issue.

I don't understand, why would it be wrong to have the manual say:

expr1 OP= expr2

is equivalent to

tmp = (expr2)
expr1 = (expr1) OP tmp

AFAK, this is what octave is doing. Is there a theory somewhere that states the above is plain wrong?

Michael.


reply via email to

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