incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Arno" <>
Subject RE: AS3 Enhancements: method overloading. Why do people want this?
Date Mon, 16 Jan 2012 15:52:48 GMT
> From: Martin Heidegger [] 
> Sent: 16 January 2012 15:22
> To fix it by renaming one would need a complex naming convention in
interfaces like:
>  function <namespace>_<functionality>()
> Because if we create a interface we don't know in advance what other
> from other frameworks it might be used with it: that means you better
write something 
> like this:
> interface IContext {
>   function get robotlegs_core_destroyed(): Boolean; }
> because some other interface might have another getter for "destroyed" 
> of which the robotlegs team doesn't know in advance.

Unless you are creating an overly-large class, it is incredibly unlikely
that you'll need one class to implement two interfaces that both contain the
method "destroy". Remember, if you aim for classes to be single purpose,
this problem should not occur. Or do you know of a real-world situation
where it can occur?

> (btw.: Complaining about non-descriptive function name in a 
> example without implementation is tedious)

Sorry, I wasn't complaining about "test", I was just using it as an example.
The better the name the less likely that there would be a conflict. Guess it
didn't come across that way :)


View raw message