Message9350

Author zyasoft
Recipients doublep, fwierzbicki, zyasoft
Date 2015-01-07.21:47:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1420667262.25.0.830082375865.issue1781@psf.upfronthosting.co.za>
In-reply-to
Content
Delaying indefinitely this idea. The problem is that in general this is an exponential search problem because each choice - int OR boolean - should be optimized at the callsite for the specific invocation.

But there's a much simpler - and standard Jython - workaround for now. Using the example in the attached test.java:

from java.lang import Integer
import test; test.lol (Integer(0), False)

will call the desired overloaded method. This is because there's no longer a choice of attempting to coerce in __tojava__ to a Java boolean or an int.

I don't see us re-exploring this sort of idea before type hinting and Jython 3.x
History
Date User Action Args
2015-01-07 21:47:42zyasoftsetmessageid: <1420667262.25.0.830082375865.issue1781@psf.upfronthosting.co.za>
2015-01-07 21:47:42zyasoftsetrecipients: + zyasoft, fwierzbicki, doublep
2015-01-07 21:47:42zyasoftlinkissue1781 messages
2015-01-07 21:47:42zyasoftcreate