in reply to Determining what new and init methods do

In what I've seen across a couple languages:

As for accessing objects that already exist, that does sound like something new() should do, in the sense that it needs to create the physical representation of the object. But, init() should handle the setting of attributes according to the fact that this is a load-from-datastore and not an insert-into-datastore.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: Determining what new and init methods do