What are the unused but useful feature you know in D?

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 26 05:11:09 PDT 2017


On 2017-06-26 01:24, Adam D. Ruppe wrote:

> I actually like anonymous classes. D took it from Java and D has a lot
> of other ways to do it too, but I've found anonymous classes to be nice
> with using my gui lib... and the only time I see other people talk about
> them is wanting to remove them from the language!

They're used heavily in DWT [1], since it's ported from Java. Before 
Java 8, when lambdas was introduced, anonymous classes inheriting from 
some interface is what was used to handle events.

[1] https://github.com/d-widget-toolkit/dwt

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list