[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Syntax for appending elements to arrays
From: |
Mohammad-Reza Nabipoor |
Subject: |
Re: [RFC] Syntax for appending elements to arrays |
Date: |
Wed, 25 Nov 2020 13:15:44 +0330 |
Hi, Jose.
On Wed, Nov 25, 2020 at 10:06:16AM +0100, Jose E. Marchesi wrote:
>
> I think I am inclined for 2) more than for 1), because it makes the
> side-effect more explicit.
:+1:
>
> A disadvantage of 2) is that not allowing `[1,2,3] + 4' may be
> unexpected for the programmer.
>
I don't think disallowing `[1,2,3] + 4` is unexpected for the programmer.
IMHO allowing such a thing is unexpected.
I also think `a += [4,5,6]` should be equivalent to
```
a += 4;
a += 5;
a += 6;
```
and not `a = a + [4,5,6]`.
Regards,
Mohammad-Reza
- [RFC] Syntax for appending elements to arrays, Jose E. Marchesi, 2020/11/25
- Re: [RFC] Syntax for appending elements to arrays,
Mohammad-Reza Nabipoor <=
- Re: [RFC] Syntax for appending elements to arrays, Dan Čermák, 2020/11/25
- Re: [RFC] Syntax for appending elements to arrays, Jose E. Marchesi, 2020/11/26
- Re: [RFC] Syntax for appending elements to arrays, Mohammad-Reza Nabipoor, 2020/11/26
- Re: [RFC] Syntax for appending elements to arrays, Jose E. Marchesi, 2020/11/27
- Re: [RFC] Syntax for appending elements to arrays, Jose E. Marchesi, 2020/11/27
- Re: [RFC] Syntax for appending elements to arrays, Egeyar Bagcioglu, 2020/11/27
- Re: [RFC] Syntax for appending elements to arrays, Jose E. Marchesi, 2020/11/27
- Re: [RFC] Syntax for appending elements to arrays, Egeyar Bagcioglu, 2020/11/27
- Re: [RFC] Syntax for appending elements to arrays, Jose E. Marchesi, 2020/11/27