D to ASM.js vs D to Dart (VM)

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Thu May 15 23:46:07 PDT 2014


On 16/05/14 00:16, Etienne wrote:

> Templates are compile-time, a D compiler always takes care of all its
> compile-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.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list