API review of VarHandles

Vitaly Davidovich vitalyd at gmail.com
Fri Jan 22 13:40:51 UTC 2016


Which existing Atomic* classes? I take it you mean the field updaters and
not AtomicInteger and friends.  The biggest issue with field updaters is
their performance, for me.  I take it you mean something else by "costs"
though? Having to specify the target (field) as a string is annoying, and I
do wish there was a way javac could assist there.  VH is no worse in this
respect, but also no better.

On Fri, Jan 22, 2016 at 8:34 AM, David M. Lloyd <david.lloyd at redhat.com>
wrote:

> On 01/22/2016 07:29 AM, Vitaly Davidovich wrote:
>
>> Experts need control more than anything else.  This is not to say they'll
>> be happy with a subpar API but control typically means lots of details so
>> there's a limit on how abstracted the API can be.  As mentioned, given the
>> API provides low level control one can build a higher level one for their
>> own needs.  The topic of ordering is complex by its nature, there's a
>> danger in hiding details in more abstract API.
>>
>
> I understand that, and that is reasonable.  However, will it be possible
> to build higher level APIs on this that do not suffer the same costs that
> make the existing Atomic* classes unattractive?
>
> --
> - DML
>



More information about the core-libs-dev mailing list