On Monday, September 2, 2002, at 10:28 , Jeffry Houser wrote:
>    :hmm:  That is interesting.  I don't like un-named scopes.  I wish
> someone at Macromedia took a little time to document this stuff.

I did, it's on my blog :) But I know what you mean! The bug is that 
'variables' scope inside a component is supposed to be the private scope 
(and unnamed scopes default to 'variables' scope).

>    I thought the variable was automatically put into the this scope.  I

Nope. It's safer this way - you have to explicitly request a public 
variable.

> have to agree with Hal on this one.  That is a kludge.  The scope should
> have a name.  A scope named private would have been a better option.

And "this" would better be named "public" or something similar (however, 
since it compiles to Java, naming scopes as keywords is probably a bad 
idea).

>  Allow me to bang my head on the desk.  I was using the two terms
> interchangeably.

No probs. A lot of people get them confused.

>   I doubled checked my OO book and it uses the term overloading
> exclusively.  What exactly is overriding, then?

Which book is that? Sounds like a bad one...

Overriding is where you define a method in a base class and you 'override'
  that definition in a derived class. When you call the method on an 
instance of the derived type, you get the function from the derived class.
  If a function is only defined in the base class (and not overridden) then 
you can still call it on a derived instance (and get the base class 
version).

Overloading is where you have more than one function - in the same scope - 
with the same name but different signatures (parameters). When you call 
the function, the compiler selects which signature to call based on the 
argument types.

>   You're right.  When did this creep into the product?  I'd bet my right
> arm that this was not supported during the beta cycle?

We were relying on it in pre-alpha builds and it was working, as far as I 
remember...

>   ;)  Then I'm sure you'll have no trouble drilling the differences 
> between
> overloading and overriding into my head?

Does my explanation above help?

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

______________________________________________________________________
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

Reply via email to