I use the 'this' scope for what would be public static final variable
in Java.  That is, values that are of use both inside and outside a
class, but never change.  CF doesn't give you the ability to actually
make them read-only (or make them class fields, rather than instance
fields), but that's an lack of functionalitythat I live with.

The one other place where I'd say it's "ok" to use the 'this' scope is
if you intentionally have a unencapsulated object.  I.e. something
that is really just a collection of data, not a real object, but you
need to package it as a CFC, rather than a Struct, for some reason
(like an init() method).

cheers,
barneyb

On Wed, 23 Feb 2005 17:03:43 +0800, James Holmes
<[EMAIL PROTECTED]> wrote:
> Does anyone use the THIS scope any more? Having just converted some nasty
> old (CF 6.0) CFCs using THIS in external code and all sorts of other bad
> things to really nice, new, VARIABLES scope code using getters and setters,
> I can't see a use for THIS, except for the return in an init() method.
> 
> Does anyone have a use for THIS that I am missing?
> 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196185
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to