Builtin array-scalar equality

Meta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 14 14:17:23 PDT 2017


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.


More information about the Digitalmars-d-learn mailing list