Message9350
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 |
|
Date |
User |
Action |
Args |
2015-01-07 21:47:42 | zyasoft | set | messageid: <1420667262.25.0.830082375865.issue1781@psf.upfronthosting.co.za> |
2015-01-07 21:47:42 | zyasoft | set | recipients:
+ zyasoft, fwierzbicki, doublep |
2015-01-07 21:47:42 | zyasoft | link | issue1781 messages |
2015-01-07 21:47:42 | zyasoft | create | |
|