Nobody understands templates?

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Fri Feb 28 17:07:04 PST 2014


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

I believe it is typical. However it can also be definition, what 
is a library? What is an application? Certainly your application 
uses libraries, and it is very likely a library you need hasn't 
been written for your application, so you may end up writing 
libraries. If you write a templated function it is to be used in 
many places for many things, shouldn't it be in a library?

I believe that the majority of an application should be library. 
I can't claim to achieve this or that the libraries I create are 
not monolithic, but it is a view that I think helps to simplify 
the application.


More information about the Digitalmars-d-learn mailing list