On Mon, Nov 22, 2004 at 07:51:29PM +0000, Matthew Walton wrote: : And can I overload based on return types?
In the case of an MMD tie, the default routine could use the return type context to break the tie. That's about the limit of what's practical, I suspect. Possibly we could give some declarative support to such tiebreaking, but hey, it's like one switch statement max: given want { when GoodNum {...} when EvilNum {...} when MyNum {...} when YourNum {...} when Num {...} when int {...} when void {...} } On the other hand, in a language like Perl, it's easy to come up with contexts that don't specify the type context as well as the user might expect. Plus asking for your return context is not necessarily going to be terribly efficient anyway if it has to chase up some stack somewhere looking for the caller, so it's not a programming style we particularly want to encourage anyway. Larry