Re: Revisiting the with() method
Jeremy Tregunna <[email protected]> Wed, 09 Nov 2011 22:44:39 -0600
| Newsgroups | gmane.comp.lang.io |
|---|---|
| Message-ID | <[email protected]> |
with is more of a convention than a best practice. Ideally, you'd give it a name that makes sense. Don't feel forced to use "with" if it doesn't really work for your object. Just make it clear in its naming that it's creating a new object. That's all you should really care about. On 2011-11-09, at 10:43 PM, gatesphere wrote: > In a recent discussion with jer, I received the same answer. Basically, use with(...) as a constructor, making sure that your setters and with() method return self. > -->Jake > > On 11/9/2011 11:11 PM, dennisf486 wrote: > >> >> I found a thread from 2006 where Steve Dekorte recommended "with" for an object initialization question. I have a similar situation as the OP. Is "with" still the recommended best practice for an object construction method name? >> >> http://groups.yahoo.com/group/iolanguage/message/8529 >> > > > Regards, Jeremy Tregunna