RE: JEP 193: Enhanced Volatiles

2014-03-06 Thread Jeroen Frijters
David Holmes wrote: But if the JVM acts upon annotations to change how it executes those bytecodes then, as Peter said, the JVM is implementing the language semantics. The JVM synthesizes a native method, this has *nothing* to do with language semantics. From the language point of view,

Re: JEP 193: Enhanced Volatiles

2014-03-06 Thread Remi Forax
On 03/06/2014 01:24 AM, David Holmes wrote: On 6/03/2014 3:22 AM, Remi Forax wrote: On 03/05/2014 06:07 PM, Peter Levart wrote: On 03/05/2014 05:55 PM, Jeroen Frijters wrote: Brian Goetz wrote: I suspect you were expecting this response: we don't add language semantics through annotations.

Re: JEP 193: Enhanced Volatiles

2014-03-06 Thread Florian Weimer
On 03/05/2014 01:05 AM, Doug Lea wrote: On 03/04/2014 05:12 PM, Florian Weimer wrote: On 03/04/2014 01:05 PM, Doug Lea wrote: On 03/04/2014 02:41 AM, Jeroen Frijters wrote: I understand pass-by-reference is an expensive feature, but IMNSHO poluting Java with this proposal will prove to be

Re: JEP 193: Enhanced Volatiles

2014-03-06 Thread Florian Weimer
What is the interaction with synthetic accessor methods for private fields? Is it not an issue because the field references will be textual anyway, so that no JVM checks will interfere? -- Florian Weimer / Red Hat Product Security Team

Re: JEP 193: Enhanced Volatiles

2014-03-06 Thread David M. Lloyd
On 03/06/2014 09:25 AM, Florian Weimer wrote: On 03/05/2014 01:05 AM, Doug Lea wrote: On 03/04/2014 05:12 PM, Florian Weimer wrote: On 03/04/2014 01:05 PM, Doug Lea wrote: On 03/04/2014 02:41 AM, Jeroen Frijters wrote: I understand pass-by-reference is an expensive feature, but IMNSHO

Re: JEP 193: Enhanced Volatiles

2014-03-05 Thread Gernot Neppert
Am 03.03.2014 20:26, schrieb mark.reinh...@oracle.com: Posted: http://openjdk.java.net/jeps/193 - Mark Reading about ideas to integrate atomic operations into the language, I was asking myself which of these operations I was using most frequently in my own code (currently by means of

RE: JEP 193: Enhanced Volatiles

2014-03-05 Thread Jeroen Frijters
- From: paulus.benedic...@gmail.com [mailto:paulus.benedic...@gmail.com] On Behalf Of Paul Benedict Sent: Wednesday, March 5, 2014 16:19 To: Christoph Engelbert Cc: Jeroen Frijters; core-libs-dev@openjdk.java.net Subject: Re: JEP 193: Enhanced Volatiles This idea really close very the commonly

Re: JEP 193: Enhanced Volatiles

2014-03-05 Thread Paul Benedict
Engelbert Cc: Jeroen Frijters; core-libs-dev@openjdk.java.net Subject: Re: JEP 193: Enhanced Volatiles This idea really close very the commonly held belief that annotations shouldn't be used to extend the language -- and thus will not be accepted. If the compiler is picking up these annotations

Re: JEP 193: Enhanced Volatiles

2014-03-05 Thread Brian Goetz
(This is already-traveled ground.) The ++/--/+= trick is cute as a shorthand, but without a means of expressing a full-blown CAS, falls short of the goal of integrate atomic read-modify-write operations into the programming model. IF the latter problem was addressed, we might consider

Re: JEP 193: Enhanced Volatiles

2014-03-05 Thread Brian Goetz
Why not go for something far less intrusive then? I'm all for unintrusive. Though note that the intrusiveness metric on language features I(f) is not uniform across observers :) Here's my straw man proposal: Add an annotation that can be placed on native methods to synthesize atomic

Re: JEP 193: Enhanced Volatiles

2014-03-05 Thread Peter Levart
On 03/05/2014 05:55 PM, Jeroen Frijters wrote: Brian Goetz wrote: I suspect you were expecting this response: we don't add language semantics through annotations. Technically, we're not adding language semantics. The JVM is the one interpreting the annotations. And the JVM is the one

Re: JEP 193: Enhanced Volatiles

2014-03-05 Thread Remi Forax
On 03/05/2014 06:07 PM, Peter Levart wrote: On 03/05/2014 05:55 PM, Jeroen Frijters wrote: Brian Goetz wrote: I suspect you were expecting this response: we don't add language semantics through annotations. Technically, we're not adding language semantics. The JVM is the one interpreting

Re: JEP 193: Enhanced Volatiles

2014-03-05 Thread Brian Goetz
I suspect you were expecting this response: we don't add language semantics through annotations. Technically, we're not adding language semantics. The JVM is the one interpreting the annotations. BTW, as I mentioned in another post in this thread, I specifically asked about this at the JVM

RE: JEP 193: Enhanced Volatiles

2014-03-05 Thread Jeroen Frijters
Brian Goetz wrote: I'm all for unintrusive. Though note that the intrusiveness metric on language features I(f) is not uniform across observers :) Indeed :-) Here's my straw man proposal: Add an annotation that can be placed on native methods to synthesize atomic accessor methods.

Re: JEP 193: Enhanced Volatiles

2014-03-05 Thread Remi Forax
On 03/05/2014 05:55 PM, Jeroen Frijters wrote: Brian Goetz wrote: I'm all for unintrusive. Though note that the intrusiveness metric on language features I(f) is not uniform across observers :) Indeed :-) Here's my straw man proposal: Add an annotation that can be placed on native methods

Re: JEP 193: Enhanced Volatiles

2014-03-05 Thread David M. Lloyd
On 03/03/2014 04:25 PM, Brian Goetz wrote: Posted: http://openjdk.java.net/jeps/193 Some follow-up thoughts on teasing apart the issues covered by this JEP. There are three main layers of questions to answer: 1. How do we surface the various pieces of this into the programming model? This

Re: JEP 193: Enhanced Volatiles

2014-03-05 Thread David M. Lloyd
On 03/04/2014 03:16 PM, David M. Lloyd wrote: On 03/03/2014 04:53 PM, David M. Lloyd wrote: On 03/03/2014 04:25 PM, Brian Goetz wrote: Posted: http://openjdk.java.net/jeps/193 Some follow-up thoughts on teasing apart the issues covered by this JEP. There are three main layers of questions

Re: JEP 193: Enhanced Volatiles

2014-03-05 Thread David M. Lloyd
On 03/05/2014 02:37 PM, David M. Lloyd wrote: On 03/03/2014 04:25 PM, Brian Goetz wrote: Posted: http://openjdk.java.net/jeps/193 Some follow-up thoughts on teasing apart the issues covered by this JEP. There are three main layers of questions to answer: 1. How do we surface the various

Re: JEP 193: Enhanced Volatiles

2014-03-05 Thread David Holmes
On 6/03/2014 3:22 AM, Remi Forax wrote: On 03/05/2014 06:07 PM, Peter Levart wrote: On 03/05/2014 05:55 PM, Jeroen Frijters wrote: Brian Goetz wrote: I suspect you were expecting this response: we don't add language semantics through annotations. Technically, we're not adding language

RE: JEP 193: Enhanced Volatiles

2014-03-05 Thread Jeroen Frijters
-Original Message- From: Peter Levart [mailto:peter.lev...@gmail.com] Sent: Wednesday, March 5, 2014 18:07 To: Jeroen Frijters; Brian Goetz; core-libs-dev@openjdk.java.net; Doug Lea Subject: Re: JEP 193: Enhanced Volatiles On 03/05/2014 05:55 PM, Jeroen Frijters wrote: Brian

Re: JEP 193: Enhanced Volatiles

2014-03-04 Thread Doug Lea
On 03/04/2014 02:41 AM, Jeroen Frijters wrote: Brian Goetz wrote: Embedded in this proposal is the desire to not provide a full-blown lvalue form for variables; supporting any form of pass-by-reference at the language level is a super-non-goal here. Why is this? It solves these problems in an

Re: JEP 193: Enhanced Volatiles

2014-03-04 Thread David M. Lloyd
On 03/03/2014 04:53 PM, David M. Lloyd wrote: On 03/03/2014 04:25 PM, Brian Goetz wrote: Posted: http://openjdk.java.net/jeps/193 Some follow-up thoughts on teasing apart the issues covered by this JEP. There are three main layers of questions to answer: 1. How do we surface the various

Re: JEP 193: Enhanced Volatiles

2014-03-04 Thread Florian Weimer
On 03/04/2014 01:05 PM, Doug Lea wrote: On 03/04/2014 02:41 AM, Jeroen Frijters wrote: Brian Goetz wrote: Embedded in this proposal is the desire to not provide a full-blown lvalue form for variables; supporting any form of pass-by-reference at the language level is a super-non-goal here.

Re: JEP 193: Enhanced Volatiles

2014-03-04 Thread Doug Lea
On 03/04/2014 05:12 PM, Florian Weimer wrote: On 03/04/2014 01:05 PM, Doug Lea wrote: On 03/04/2014 02:41 AM, Jeroen Frijters wrote: I understand pass-by-reference is an expensive feature, but IMNSHO poluting Java with this proposal will prove to be more expensive in the long run. It's like

Re: JEP 193: Enhanced Volatiles

2014-03-04 Thread Brian Goetz
Embedded in this proposal is the desire to not provide a full-blown lvalue form for variables; supporting any form of pass-by-reference at the language level is a super-non-goal here. Why is this? It solves these problems in an extremely clean way and also provides lots of other value (for

RE: JEP 193: Enhanced Volatiles

2014-03-04 Thread Jeroen Frijters
Brian Goetz wrote: Right now, the semantics of method calls in Java are simple -- everything (primitives, object references) is passed by value. Adding pass-by-reference would add significant complexity. And method calls are not a niche feature; that added complexity will be borne by every

Re: JEP 193: Enhanced Volatiles

2014-03-04 Thread Christoph Engelbert
Am 05.03.2014 um 08:40 schrieb Jeroen Frijters jer...@sumatra.nl: My goal here is to make sure that expert users can get their job done somehow, *without* making the job of mainstream developers harder. The add lvalues to Java so experts can write CAS-libraries fails that test miserably.

JEP 193: Enhanced Volatiles

2014-03-03 Thread mark . reinhold
Posted: http://openjdk.java.net/jeps/193 - Mark

Re: JEP 193: Enhanced Volatiles

2014-03-03 Thread Brian Goetz
Posted: http://openjdk.java.net/jeps/193 Some follow-up thoughts on teasing apart the issues covered by this JEP. There are three main layers of questions to answer: 1. How do we surface the various pieces of this into the programming model? This includes language syntax (e.g.,

Re: JEP 193: Enhanced Volatiles

2014-03-03 Thread David M. Lloyd
On 03/03/2014 04:25 PM, Brian Goetz wrote: Posted: http://openjdk.java.net/jeps/193 Some follow-up thoughts on teasing apart the issues covered by this JEP. There are three main layers of questions to answer: 1. How do we surface the various pieces of this into the programming model? This

RE: JEP 193: Enhanced Volatiles

2014-03-03 Thread Jeroen Frijters
Brian Goetz wrote: Embedded in this proposal is the desire to not provide a full-blown lvalue form for variables; supporting any form of pass-by-reference at the language level is a super-non-goal here. Why is this? It solves these problems in an extremely clean way and also provides lots of