Array Operations: a[] + b[] etc.

David Nadlinger see at klickverbot.at
Wed Nov 21 10:17:39 PST 2012


On Wednesday, 21 November 2012 at 18:15:51 UTC, Walter Bright 
wrote:
> On 11/21/2012 10:02 AM, John Colvin wrote:
>> My vision of how things could work:
>> c = a[] opBinary b[];
>> should be legal. It should create a new array that is then 
>> reference assigned to c.
>
> This is not done because it puts excessive pressure on the 
> garbage collector. Array ops do not allocate memory by design.

We really need better error messages for this, though – Andrej? 
;)

David


More information about the Digitalmars-d mailing list