June 14, 2017 Builtin array-scalar equality | ||||
---|---|---|---|---|
| ||||
Why isn't bool c = a[] == 4; allowed when a[] = b[] + 4; is? given that int[] a, b; |
June 14, 2017 Re: Builtin array-scalar equality | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On Wednesday, 14 June 2017 at 21:15:32 UTC, Nordlöw wrote:
> Why isn't
>
> bool c = a[] == 4;
>
> allowed when
>
> a[] = b[] + 4;
>
> is?
>
> given that
>
> int[] a, b;
That's just how it is. There are a lot of array-wise operations that *could* be implemented in the language but aren't.
|
Copyright © 1999-2021 by the D Language Foundation