You would almost have to set up a hierarchy in a dynamically typed 
language.  If you didn't and had an overloaded method, one expecting 
string and one expecting numeric, and passed in 1.92, which method would 
it call?

Nicholas M. Tunney
Blog: http://www.nictunney.com

Adobe Certified Advanced ColdFusion MX7 Developer
Adobe Certified Instructor
Adobe Community Expert



Eric Roberts wrote:
> Why can't you have overloading in a dynamically typed language?  Overloading
> isn't just sending over an argument with a different type...it is also
> sending over different numbers of arguments.  If I remember correctly from
> my C days, you can overload in C...so I would agree that these have nothing
> to do with OO.
>
> Eric
>
> -----Original Message-----
> From: Sean Corfield [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 10, 2007 3:02 AM
> To: CF-Talk
> Subject: Re: SURVEY RESULTS: Is ColdFusion OO?
>
> On 7/9/07, Steve Brownlee <[EMAIL PROTECTED]> wrote:
>   
>> - Overloading
>> - Generics
>> - Method overriding
>> - Static methods
>> - And most importantly, it's not typed (i.e. you can't cast a Sphere CFC
>>     
> as
>   
>> a Ball CFC, among a myriad of other possibilities)
>>     
>
> None of these has the slightest thing to do with OO. Lots of OO
> languages out there do not have any of these features!
>
> This is exactly my point: you're blinded by Java. Generics in
> particular are ANTI-OO. Generic programming is completely orthogonal
> to OO. Read some of the literature. Read about the STL in C++.
>
> You CANNOT have overloading in a dynamically typed language.
>
> ColdFusion already has method overriding.
>
> Static methods have nothing to do with OO (they are in fact more
> procedural than OO).
>
> Casting types has nothing to do with OO - in a dynamic language, you
> don't NEED casts - the objects already behave the right way.
>   

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 beta – Build next generation applications today.
Free beta download on Labs
http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283438
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to