I agree with you completely, Matt. I object to CFCs using the "this" scope and making this public. It removes virtually all of the benefits of having it. This could easily have been overcome by allowing us to set access attributes such as private. But using an "unnamed scope" seems to me to be a kludge to get around what should have been implemented. Having a <cfproperty> tag with an access attribute (or some such mechanism) would make perfect sense.
The term, OO, is not merely an imprimatur that marketing can annoint a product with if it is to mean anything at all. We should be able to expect that "this" is a private scope, that CFCs would have overloadable methods, overloadable constructors, etc. Hal Helms Preorder "Discovering ColdFusion Components (CFCs)" at www.techspedition.com -----Original Message----- From: Matt Liotta [mailto:[EMAIL PROTECTED]] Sent: Monday, September 02, 2002 12:24 PM To: CF-Talk Subject: RE: CFC theory > Let's see: CFCs have given us a "this" scope which is *public*; instance > variables can't be made private except by the kludge of using an unnamed > scope. We have CFCs presented as OO, but which has no concept of super. > We have no overloading of methods in CFCs. > I don't really think making variables private within CFCs is a kludge. I do however feel the implementation of CFCs is generally poor. IMHO, the cfproperty tag should declare variables for a CFC and should include an attribute for public or private access. Further, any variables declared with cfset should be private within the context of where they were declared. This would enable function scoped variables automatically without having to use the stupid var keyword. I do wish CFCs were more Java like, but I wouldn't be so quick to say they aren't OO. > Were I given to irony, I might say that "I am not anti-CFC per se, but > it does tend to live in its own little bubble and it takes words, > concepts and phrases from the much larger world of OO and misuses them > in a way that causes confusion." > I think a perfect example is ColdFusion Component, which is nothing more than a class. -Matt ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

