On 11/12/2013 06:46 AM, Andrei Alexandrescu wrote:
On 11/11/13 2:36 PM, Timon Gehr wrote:
On 11/11/2013 11:02 PM, deadalnix wrote:
On Sunday, 10 November 2013 at 12:39:35 UTC, Timon Gehr wrote:
What about Object.factory?

I always though of it as a misfeature.

Me too.

... well time to substantiate.

Andrei

- Every class in any imported module will need to show up in the generated code even if it is never used unless global static analysis is carried out on arguments to Object.factory.

- If I know the fully qualified name of a class, there are better ways to instantiate this class than passing a string containing that name to Object.factory in order to call the default constructor.

- The functionality provided by Object.factory is trivially replaced by a solution more specifically tailored to the problem at hand using compile-time reflection.

Reply via email to