Games people play

Kristian kjkilpi at gmail.com
Wed Oct 4 09:18:56 PDT 2006


On Wed, 04 Oct 2006 08:04:03 +0300, Walter Bright  
<newshound at digitalmars.com> wrote:
> Bill Baxter wrote:
[snip]
>> arguments, resulting in repetitive code.  Some form of Variadic  
>> Templates would be very nice to have there.
>>  So instead of
>> template Signal(T1) // for one argument ...
>> template Signal(T1, T2) // for two arguments ...
>> template Signal(T1, T2, T3) // for three arguments ...
>> template Signal(T1, T2, T3, T4) // for four arguments ...
>> template Signal(T1, T2, T3, T4, T5) // for five arguments ...
>> template Signal(T1, T2, T3, T4, T5, T6) // for six arguments ...
>> template Signal(etc...
>>  You can just have one template
>> template Signal(...) // for any number of arguments ...
>
> That would be better, but the user doesn't see that code, just the  
> library implementer. So it isn't so bad.

Hey, library writers are people too! ;)

Actually I think it's absurd to divide people into two groups: ones  
writing libraries and ones using them. If you write something more complex  
than tiny programs, you're gonna need all the same features and tricks  
than library writers. Eventually.

I think library writers and other heavy duty users would be good test  
subjects, wouldn't they? What they will need, the language should provide.  
;)



More information about the Digitalmars-d mailing list