Recent improvements

Bienlein jeti789 at web.de
Wed Feb 19 06:02:37 PST 2014


On Wednesday, 19 February 2014 at 13:53:17 UTC, Philippe Sigaud 
wrote:
> On Wed, Feb 19, 2014 at 2:18 PM, Bienlein <jeti789 at web.de> 
> wrote:
>> I see. Unhappily, I don't have a D compiler handy. Would this 
>> compile:
>>
>> immutable s = ["red", "blue"].sum
>>
>> If not, it would be interesting to understand how that works 
>> :-)
>
> It won't work, since binary + is not defined for strings. I 
> don't
> understand what you want, here.

Then how can you add a sum method to a parameterized type if it 
only works for numbers?



More information about the Digitalmars-d mailing list