value type hygiene
Dan Smith
daniel.smith at oracle.com
Fri May 11 17:48:56 UTC 2018
> On May 10, 2018, at 7:36 PM, John Rose <john.r.rose at oracle.com> wrote:
>
> There could be an interface default method, or some other method,
> which is simultaneously a member of two trees with two different
> decisions about scalarization vs. buffering. This can be handled
> by having the JVM create multiple adapters. I'd rather forbid the
> condition that requires multiple adapters as a CLC violation,
> because it is potentially complex and buggy, and it's not clear
> we need this level of service from the JVM.
Use case:
---
Library code
interface Event {
LocalDateTime timestamp();
}
---
Client 1 code, compiled with reference class LocalDateTime
class Client1Event implements Event { ... }
---
Client 2 code, compiled with value class LocalDateTime
class Client2Event implements Event { ... }
---
Various circumstances can lead to two different clients running on a single JVM, including, say, dependencies between different libraries.
Am I understanding correctly that you would consider loading/invoking these methods to be a JVM error?
More information about the valhalla-spec-observers
mailing list