On Wednesday, Jul 30, 2003, at 15:25 US/Pacific, Hal Helms wrote:
I think the problem began when Macromedia chose the name "this", which
really operates in two separate modes. On one hand, it's a public scope.
On the other hand, it's a reference to the object created from the CFC.
Worse, by choosing the name, "this", they borrow the terminology from
Java while redefining its meaning.

Yes, I agree with Hal that this was probably one of the more unfortunate language design decisions made when CFCs were added into the language. I can sort of see why they did it, from a ColdFusion-has-named-scopes point of view, but it's still caused a lot of confusion.


Fortunately, Red Sky fixes "variables" scope so that it can actually be used as intended inside CFCs to represent a non-public scope.

Note: I say 'non-public' because neither the unnamed scope (in CFMX and Red Sky) nor the variables scope (Red Sky) are actually private. They're closer to being protected, in Java terminology, but even then there really isn't a 100% match.

Sean A Corfield -- http://www.corfield.org/blog/

"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 word 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Reply via email to