On 2015-08-21 07:06, Walter Bright wrote:
This function:

   http://dlang.org/phobos/object.html#.Object.factory

enables a program to instantiate any class defined in the program. To
make it work, though, every class in the program has to have a TypeInfo
generated for it. This leads to bloat:

   https://issues.dlang.org/show_bug.cgi?id=14758

and sometimes the bloat can be overwhelming.

The solution seems straightforward - only have Object.factory be able to
instantiate classes marked as 'export'. This only makes sense anyway.

If we're actually going to talk about solution then it seems better to have a flag that disables Object.factory. It won't break any code and everyone that doesn't like can disable it. Everybody wins.

--
/Jacob Carlborg

Reply via email to