« Return to Thread: Draft SIP: From constructors to factories: Uniform treatment of object creation

Draft SIP: From constructors to factories: Uniform treatment of object creation

by David MacIver :: Rate this Message:

Reply to Author | View in Thread

Summary: Make it easy to switch from constructors to factories after
the fact by adding a mechanism where "new Foo(stuff)" can translate to
an invocation of a user defined method on the companion object.

http://www.drmaciver.com/factories-sip.xhtml

 « Return to Thread: Draft SIP: From constructors to factories: Uniform treatment of object creation