JEP 169: Value Objects
BGB
cr88192 at gmail.com
Wed Nov 7 14:30:17 PST 2012
On 11/7/2012 4:15 PM, Vitaly Davidovich wrote:
>
> Hi John,
>
> Nice to see this effort moving forward. While reading the JEP, I
> can't help but think how complicated this sounds for JVM
> implementors. Is introducing bytecodes and new value type
> representation definitely a nonstarter? I'm thinking a setup akin to
> the CLR.
>
> I certainly understand the attraction of keeping bytecode the same,
> but wouldn't it make the JVM impl more straightforward (and thus more
> robust, stable, performant, etc) if value types/structs were first
> class citizens?
>
> I'm sure you've thought about this plenty so I'm mostly curious to
> hear your take on the tradeoffs and generally on how you think this
> approach will shake out.
>
agreed, though it need not be "that" bad (probably it would be mostly
handled by a dynamic check on the reference or on the object?).
I think it would be nice if, say, a particular class could be marked as
"lockPermanently", so any new instances of the given class would have
this property by default.
like, say, if we could do something like:
@LockPermanently
public class Foo ...
or:
@ValueClass
public class Foo ...
this could be partly so that the JVM could look at the class and be like
"hey, this class is always locked" and possibly optimize it a little
more aggressively.
otherwise, things would mostly be as-is (the ability to do this on a
per-instance basis is an interesting idea...).
> Thanks
>
> Sent from my phone
>
> On Nov 7, 2012 4:36 PM, "John Rose" <john.r.rose at oracle.com
> <mailto:john.r.rose at oracle.com>> wrote:
>
> Thanks! This will move the conversation forward.
>
> -- John (on my iPhone)
>
> On Nov 7, 2012, at 1:25 PM, mark.reinhold at oracle.com
> <mailto:mark.reinhold at oracle.com> wrote:
>
> > Posted: http://openjdk.java.net/jeps/169
> >
> > - Mark
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net <mailto:mlvm-dev at openjdk.java.net>
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>
>
>
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20121107/e029e270/attachment.html
More information about the mlvm-dev
mailing list