On Monday, September 2, 2002, at 02:30 , Hal Helms wrote: > Polymorphism is based on types, Sean. I won't return your insult and > suggest that you don't know this. I'm suggesting that if CF knows enough > about types to implement polymorphic behavior that it might know enough > to allow for overloading.
Polymorphism and overloading are very different beasts. Polymorphism is implemented as a compiler mechanism to create the correct function despatch table in a particular object instance - pretty much what CF does. It's a single behavior uniquely identified by static type information. Overloading requires a complex comparison and decision process within the compiler based on static information. However, CF does not have static type information for values in general - it uses runtime typing and runtime validation. If you wanted to implement overloading in CF it would have to do so at *runtime* which would impact every single function call and slow the system down dramatically. That's why you can't have full overloading in a typeless language - it's not really feasible from a performance point of view. > To respond to your direct question, yes, I can actually program in > Smalltalk and Java. It was a genuine question - I couldn't tell from your comments how well you knew Java because you seem to be confusing various concept, or at least the principles behind some of those concepts. I'm just trying clarify the issues so that we all understand why certain language features are the way they are in various languages. That's probably my compiler development background at work :) > I would think that you would be interested in the issues I've > raised about CFCs and the implementation of OO. I am, and I'm trying to understand your background so I can see why you are taking some of the approaches to issues that you are... Humor me. Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.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

