Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8330465

Stable Values (Preview)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • None
    • core-libs
    • None

      Create a preview implementation of the proposed "Stable Values & Collections" API.

      # Summary
      Introduce a _Stable Values & Collections API_, which provides performant immutable value holders where elements
      are initialized _at most once_. Stable Values & Collections offer the performance and safety benefits of
      final fields, while offering greater flexibility as to the timing of initialization.

      # Goals
       * Provide an easy and intuitive API to describe value holders that can change at most once.
       * Decouple declaration from initialization without significant footprint or performance penalties.
       * Reduce the amount of static initializer and/or field initialization code.
       * Uphold integrity and consistency, even in a multi-threaded environment.

      For more details, see the draft JEP: https://openjdk.org/jeps/8312611

            pminborg Per-Ake Minborg
            pminborg Per-Ake Minborg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: