JSRs: What Lies Beneath
infoq.com
infoq.com
I don't see why the initial implementation couldn't be simpler. Wouldn't the simple implementation have similar performance to the status quo (i.e. using if statements), with the immediate benefit of cleaner syntax? In fact, why should this level of optimisation be part of the JSR at all? It sounds like something the JVM implementers could optimise without any change to the way the switch works. Tying it to the JSR makes the spec more complicated, delays an initial version and forces this optimisation to be prioritised over others.