On Monday, September 2, 2002, at 01:54 , Hal Helms wrote:
> I can't agree that this is the same as in Java. In Java, I can define an
> instance variable as private and then set it to an identically named
> argument passed into a method.

Only if you explicitly qualify the instance variable with 'this.' so it 
doesn't clash with the argument name (remember that in Java, arguments are 
the unnamed scope - so you have exactly the same type of namespace clash!)
.

> You've said that the unnamed scope is the
> way to implement private instance variables, yet the code shows that you
> cannot set the unnamed scope to an identically named argument passed
> into a method. Why not simply allow the "this" scope to contain private
> as well as public variables?

At the risk of perpetuating this somewhat circular argument, the reason is 
because there is no way to declare instance variables in CF so you can't 
specify access on variables.

Yes, it would be nice if cfproperty affected 'this' scope variables. But 
it doesn't. cfproperty just defines class metadata.

CF behaves a particular way. Let's just get over, OK?

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

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.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

Reply via email to