dmd codegen improvements

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 3 06:12:05 PDT 2015


On Thursday, 3 September 2015 at 06:45:16 UTC, Jacob Carlborg 
wrote:
> There's a lot of stuff other languages can do that JS can't. 
> For example, classes, which a lot of developers prefer to use 
> in favor of the weird object system in JS.

You can kinda do classes in JS, it just isn't pretty syntax. In 
the D to JS toy I did, I just did an array of function pointers 
to handle the virtual functions, similar to how D is compiled to 
machine code.

It'd be fairly ugly to write by hand but when converting 
languages, it works well enough.


More information about the Digitalmars-d mailing list