[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: undefined compound chaining behavior
From: |
Hossein Sajjadi |
Subject: |
Re: undefined compound chaining behavior |
Date: |
Tue, 10 Jun 2014 16:42:25 +0330 |
> Ok, I understand. I think the best thing you can do to resolve this is
> to report a bug [1] requesting that the manual be updated to describe
> this behavior of assignment operators more clearly. To be clear, there
> is no undefined behavior here, it's just that OP= means that the
> left-hand side of the assignment is evaluated when the assignment is
> made. So the simple equivalence described in the manual is not correct
> if EXPR2 modifies EXPR1 as a side effect.
>
> [1] https://savannah.gnu.org/bugs/?func=additem&group=octave
>
> Thanks,
>
> --
> mike
>
By introduction of compound assignment in Octave it is intended to be
an improvement regards to Matlab but this introduce other issuses such
as violation of referential transparency.
I suggest two approach:
1. Do not allow compound assignment to be chained ( VB.NET , PACAL ,
Python, Go)
2. compound assignment can be chained but like what Java, C# , julia ,.. do.
I prefer second approach but it seems that you say correctly what you say:
"We can change the order of evaluation if we want to, but we don't want to."
I think the rules, if there are any rules, should be updated.
Thank you very much,
Hossein
- Re: undefined compound chaining behavior, (continued)
- Re: undefined compound chaining behavior, Daniel J Sebald, 2014/06/09
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/09
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/09
- Re: undefined compound chaining behavior, Mike Miller, 2014/06/09
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/09
- Re: undefined compound chaining behavior, Mike Miller, 2014/06/09
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/10
- Re: undefined compound chaining behavior, Ben Abbott, 2014/06/10
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/10
- Re: undefined compound chaining behavior, Mike Miller, 2014/06/10
- Re: undefined compound chaining behavior,
Hossein Sajjadi <=
- Re: undefined compound chaining behavior, Mike Miller, 2014/06/10
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/10
- Re: undefined compound chaining behavior, Michael Goffioul, 2014/06/10
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/10
- Re: undefined compound chaining behavior, Mike Miller, 2014/06/10
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/10
- Re: undefined compound chaining behavior, Michael D. Godfrey, 2014/06/10
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/10
- Re: undefined compound chaining behavior, Mike Miller, 2014/06/10
- Re: undefined compound chaining behavior, Hossein Sajjadi, 2014/06/10