On Thu, 20 Jan 2005 08:13:47 -0500, Patrick McElhaney <[EMAIL PROTECTED]> wrote: > On Wed, 19 Jan 2005 15:53:10 -0800, Sean Corfield > <[EMAIL PROTECTED]> wrote: > > But C is more loosely coupled to Thingy. C is dependent on > > ThingyHolder but not on the Thingy itself. Whatever > > ThingyHolder.getThing() returns must have a doSomething() method but > > it could be absolutely any type of object. > True. But having getThingy() return anything other than a Thingy isn't > going to win me any friends. The compiler doesn't know that but I do.
Actually, getThings() can return *any* type of object as long as that object has a doSomething() method. That's why C reduces coupling to Thingy. > I think that may be part of why I was getting confused. I learned OO > through strongly typed languages and I'm used to thinking in terms of > what will compile. In a strongly typed OO language, you'd probably use an interface to enforce this 'contract' - something we don't have in CF. -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ Breeze Me! -- http://www.corfield.org/breezeme Got Gmail? -- I have 5 invites to give away! "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ---------------------------------------------------------- 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]
