June 22, 2012
On 06/22/12 23:37, Guillaume Chatelet wrote:
> On 06/18/12 04:18, Andrei Alexandrescu wrote:
>> I think traits are something that we could add piecemeal, without a large proposal - just as pull requests. For each particular concept there should be 1-2 compelling examples in the documentation, enough to make a case that the notion being added is worthwhile.
>>
>> For a simple example I'd like "arity" (I'm unclear whether it belongs in std.traits or std.functional). Sure, I could write ParameterTypeTuple!fun.length, but that's quite a roundabout way to go about it.
>>
>>
>> Andrei
> 
> So here it is. A first very small patch to add arity to std.traits.
> 
> As you stated it could really go either in std.traits or std.functional. I chose to keep it in std.traits because std.functional is more about creating new functions of modifying existing ones whereas std.traits is about deducing properties.
> 
> Guillaume

It's better with a link :-P https://github.com/D-Programming-Language/phobos/pull/643
June 27, 2012
On 6/22/12 5:37 PM, Guillaume Chatelet wrote:
> On 06/18/12 04:18, Andrei Alexandrescu wrote:
>> I think traits are something that we could add piecemeal, without a
>> large proposal - just as pull requests. For each particular concept
>> there should be 1-2 compelling examples in the documentation, enough to
>> make a case that the notion being added is worthwhile.
>>
>> For a simple example I'd like "arity" (I'm unclear whether it belongs in
>> std.traits or std.functional). Sure, I could write
>> ParameterTypeTuple!fun.length, but that's quite a roundabout way to go
>> about it.
>>
>>
>> Andrei
>
> So here it is. A first very small patch to add arity to std.traits.
>
> As you stated it could really go either in std.traits or std.functional.
> I chose to keep it in std.traits because std.functional is more about
> creating new functions of modifying existing ones whereas std.traits is
> about deducing properties.

Great. You should know I'm on vacation with scant access to email.

Andrei

1 2 3 4
Next ›   Last »