On Friday, 16 May 2014 at 06:46:08 UTC, Jacob Carlborg wrote:
On 16/05/14 00:16, Etienne wrote:Templates are compile-time, a D compiler always takes care of all itscompile-time duties =)Unfortunately it does not. It causes unnecessary bloat. Take this for example:void foo (T) (T t); foo(new Foo); foo(new Bar);This will generate two functions, even though the machine code is exactly the same for both.
If the machine code is the same, the function can be merged by the optimizer.