Nobody understands templates?

woh wojw at yahoo.com
Sat Mar 1 14:16:53 PST 2014


  You probably don't have a good understanding of templates if you 
have only used 2 in your entire codebase.  Or you are talking 
about a very tiny codebase.



n Saturday, 1 March 2014 at 18:00:21 UTC, Steve Teale wrote:
> On Friday, 28 February 2014 at 19:06:26 UTC, Dicebot wrote:
>> On Friday, 28 February 2014 at 18:42:57 UTC, Steve Teale wrote:
>>> Is this typical - libraries use templates, applications 
>>> don't, or
>>> am I just being unimaginative?
>>>
>>> Steve
>>
>
>> Also every time you catch yourself doing any sort of 
>> copy-paste, it is quite possible that it can be replaced by 
>> mixin / template mixin instead. Application that are built in 
>> more declarative way benefit more from such tool set than 
>> traditional imperative ones.
>
> In have a couple of case that always require me to find some 
> other instance of it, and then copy/paste, But then I need to 
> edit the pasted code anyway because in any particular case it 
> needs to deal with different command info, so how can mixins 
> help me? I have already dealt with the yada-yada cases by 
> old-fashioned OOP.
>
> From the various answers to this question I have concluded that 
> I should not worry about it. If there's a need for a template I 
> think I am already recognizing it.
>
> Thanks!all()
> Steve



More information about the Digitalmars-d-learn mailing list