>> 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!) I think what Hal is getting at is that in Java you can do this: private int x; void foo(int x) { this.x = x; } in C++ you can do this: void foo(int x) { this->x = x; } but there is no way to do that with CFC's. I think the this scope was a poor name choice, I would expect the this keyword to point to, or reference my object as it does in C++ or Java. I'm not saying that CFC's should be exactly like Java or C++ classes, but it would have led to less confusion if "this" was named "public" or something else. _____________________________________________ Pete Freitag CTO, CFDEV.COM ColdFusion Developer Resources http://www.cfdev.com/ ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists