Stable Values (Preview)

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P3
    • None
    • Affects Version/s: None
    • Component/s: 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

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

              Created:
              Updated: