Ticket #3 (reopened defect)

Opened 4 years ago

Last modified 4 years ago

Why does Object.factory duplicate ClassInfo.find ?

Reported by: larsivi Assigned to: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: object cleanup Cc:

Description (Last modified by larsivi)

ClassInfo is the obvious and correct placement for this functionality, and since it is public via object.di, why is it duplicated as Object.factory?

Committed in [22].

Change History

10/12/08 16:35:08 changed by larsivi

  • description changed.

10/16/08 10:48:20 changed by sean

  • status changed from new to closed.
  • resolution set to wontfix.

Walter and I discussed this and he convinced me that this is an important enough feature that it's worth making a part of Object's public interface. Also, there was some concern that by existing solely in ClassInfo?, and exposed in a non-obvious manner, many users wouldn't be aware it was there (in fact, he didn't even notice it). I think this justifies the existence of a factory method in Object, but if you or others feel otherwise then please reopen the ticket with additional explanation.

10/16/08 16:21:39 changed by larsivi

  • status changed from closed to reopened.
  • resolution deleted.

This isn't the most important of issues, but the fact that Object.factory is a wrapper says enough about it not really belonging there. Walter did obviously find the functionality in ClassInfo, otherwise he wouldn't have been able to write the wrapper ...

There do exist a fairly good reason to have such a wrapper, though it belonging in Object is still somewhat dubious.

Also, factory is not a good name for it, since the function is named as a property and you would normally expect to have a factory returned. Since it is an action, it needs to have a verb as a name, something along the lines of 'create'.

I am reopening the ticket to at least get a proper name.