[E-Lang] Coming Attractions: Java Overload Resolution
Bill Frantz
frantz@pwpconsult.com
Sat, 24 Mar 2001 12:10:26 -0800
At 8:32 AM -0800 3/24/01, Mark S. Miller wrote:
>... starting with E 0.8.9t, E will now correctly
>implements a much less irritating but still unsurprising spec. (Thanks to
>MarcS for help figuring out the new spec.) The new spec is that if the
>argument list is compatible with exactly one of the overloaded parameter
>lists, then that method is executed. Otherwise an exception is thrown.
>
>...
>
>Note: For those writing new Java code with E in mind, it's still recommended
>to overload only on arity, not on type. There's a significant new overhead
>to doing the runtime type-based overload resolution, while the
>non-overloaded case should now be a bit faster.
>
>Does this new rule seem strictly superior and unproblematic to everyone?
>What does JPython do?
What happens if maintenance to the Java code adds new methods with
additional subclasses for a parameter. It may be that E code that worked
with the old Java code now finds two methods which are "acceptable" and
gets an exception.
Cheers - Bill
-------------------------------------------------------------------------
Bill Frantz | Microsoft Outlook, the | Periwinkle -- Consulting
(408)356-8506 | hacker's path to your | 16345 Englewood Ave.
frantz@netcom.com | hard disk. | Los Gatos, CA 95032, USA