www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Builtin array-scalar equality

reply =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
Why isn't

     bool c = a[] == 4;

allowed when

     a[] = b[] + 4;

is?

given that

     int[] a, b;
Jun 14
parent Meta <jared771 gmail.com> writes:
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.
Jun 14