Object.factory() and exe file size bloat

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Fri Aug 21 01:49:49 PDT 2015


On 2015-08-21 09:24, Benjamin Thaut wrote:

> Given how limited object.factory is I would just vote that we kill it
> completely. Every time I wanted to use it, it was to limited and I ended
> up building my own reflection / factory mechanism.

How is it limiting? That it only works with default constructors? I 
don't think that underlying ClassInfo.find is limiting, which is where 
the interesting part happens. I'm pretty sure that Object.factory could 
be extended to support non-default constructors, if that makes it less 
limiting.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list