Lazy initialization is not a good use for that. 100% agreement there. Do you find yourself doing that a lot? I've never gone that route, prefering monolithic initialization blocks. I can see some benefits, but they seem small for the headaches (you mentioned the big one). Just curious.
Cheers, barneyb > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Sean A Corfield > Sent: Tuesday, March 16, 2004 3:36 PM > To: [EMAIL PROTECTED] > Subject: Re: [CFCDev] Returing "THIS" from init(), WAS: RFC, > CFC Best Practices > > On Mar 16, 2004, at 3:10 PM, Barney Boisvert wrote: > > Use a semaphore. Ok, this time I copied and pasted from > actual code > > that is > > confirmed to work correctly (rather that writing it on the fly). > > Yup, that does indeed work. Of course you might well want a semaphore > variable for each application variable you need to initialize > if you're > doing fully lazy evaluation so the cost of not chaining > init() calls is > to double the number of application variables you are dealing with :) > > Regards, > Sean ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
