Second CT-Parameter of isRange Predicates

Atila Neves via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 3 00:37:20 PST 2015


On Tuesday, 3 November 2015 at 03:26:47 UTC, Jonathan M Davis 
wrote:
> On Monday, 2 November 2015 at 15:00:23 UTC, Andrei Alexandrescu 
> wrote:
>> On 11/02/2015 09:43 AM, Nordlöw wrote:
>>> On Monday, 2 November 2015 at 14:43:00 UTC, Nordlöw wrote:
>>>> On Monday, 2 November 2015 at 14:33:44 UTC, Andrei 
>>>> Alexandrescu wrote:
>>>>>> https://github.com/D-Programming-Language/phobos/pull/3786
>>>>>
>>>>> Sent an ICBM its way. -- Andrei
>>>>
>>>> Why not extend existing traits with a second `E`-parameter 
>>>> instead of
>>>> adding a new one?
>>>
>>> I think it's very well worth it in terms of expressability.
>>
>> I'd say it's a minor convenience.
>
> I'm actually a bit surprised at the suggestion, since I would 
> have expected most code to either not care what the ElementType 
> was or to have to test something about it other than simply 
> testing for an exact type.

Am I the only one who ever writes `int[]` or `Struct[]` in a 
function signature?

Atila



More information about the Digitalmars-d mailing list