encyclopegia.org

Project Valhalla (Java language)

In computing, Project Valhalla is an experimental OpenJDK project to develop major new language features for Java 10 and beyond. The project was announced in July 2014 and is an experimental effort by Oracle, led by engineer Brian Goetz. The project page offers an overview as well as links to technical drafts and early-access builds.

In computing, Project Valhalla is an experimental OpenJDK project to develop major new language features for Java 10 and beyond. The project was announced in July 2014 and is an experimental effort by Oracle, led by engineer Brian Goetz. The project page offers an overview as well as links to technical drafts and early-access builds. ==Planned features== Valhalla is incubating Java language features and enhancements in these areas: Value Classes and Objects: highly-efficient objects without their own identity (reference value). Null-restricted and Nullable types, and Null-restricted Objects: for example, using ! after type declaration to say if null is disallowed. Enhanced Primitive Boxing: for example, to allow code such as List . Reified Generics: retaining actual type at runtime. These features will require both syntax and VM-level changes. In 2026, development is listed as being in these areas: Value Objects Null-restricted storage Array enhancements, including immutability and safe initialization Unifying Primitives and Classes Parametric JVM (replacing development of reified generics) ==Project components== The project is organized into several JEPs (JDK Enhancement Proposals): JEP draft: Value Objects (Withdrawn) JEP 401: Value Classes and Objects (Preview) JEP 402: Enhanced Primitive Boxing (Preview) JEP draft: Universal Generics (Withdrawn) JEP draft: Null-Restricted Value Class Types (Preview) Value classes are reference types, in the same way as all existing Java classes. However, they give up the ability to have identity. This means that the == operator compares instance of the value class by equality of their components, instead of by identity. Additionally, synchronizing on instances of value classes will fail. Value classes still support null , since they are reference types. The Java Virtual Machine is expected to be able to take advantage of the additional constraints of value classes to eliminate heap allocation of value types in the vast majority of cases. However, storing instances of value classes into a field or upcasting them to an interface will still require an allocation. Existing types in the Java API such as java.util.Optional are known as value-based classes, and are candidates for being made into value classes in a future JDK release. Value classes are now a proposed feature for JDK version 28, and introduces value class declarations. Primitive classes are subject to all the constraints of value classes, but are not reference types. This means they give up the ability to support null . Instead, their default values are the zero value for each of the component types ( 0 for numerical types, false for boolean , null for reference types, and the zero value for nested primitive classes). All primitive classes are stored "inline", that is, without requiring a heap allocation. Arrays of primitive classes will not require a pointer indirection from the array to the heap. Where needed, conversions will be inserted to "box" the primitive class into a value class version of itself and vice versa. import java.util.ArrayList; import java.util.List; // List instead of List List intList = new ArrayList<>(); intList.add(10); intList.add(20); System.out.printf("Integer List: %s%n", intList); // List instead of List List doubleList = new ArrayList<>(); doubleList.add(3.14); doubleList.add(2.718); System.out.printf("Double List: %s%n", doubleList); This JEP is meant to express the classical primitive types of the Java Virtual Machine ( byte , char , short , int , long , boolean , float , double ) as primitive classes. Traditionally, the eight primitive types are treated separately from all other types. Providing primitive class declarations from them removes much of this special-casing, leading to a more elegant and easy to understand type system. ==Technical benefits and implications== Memory access performance and the efficiency of 'boxed' value access are a major area to be addressed by these features. 'Value Type' features and 'Generic specialization' (when applied to lists or collections) reduce memory usage, but more importantly avoid pointer indirection which typically causes a cache miss. Instead of a list or array of object references, pointing to data values scattered throughout memory, Project Valhalla enhancements will enable list or array values to potentially be laid out linearly—without indirection—as a consecutive block of memory. Value Types are envisaged as "Codes like a class, works like an int!" Synchronization and inheritance would be excluded for Value Types. These would no longer require object identity and associated memory/ pointer overheads, though would be able to assume a 'boxed' form for compatibility. Brian Goetz, the engineer behind Project Valhalla, suggested that operator overloading could be added to Java after the introduction of value types. ==See also== Generics in Java Generic programming Value type ==References==

References

  1. Welcome to Valhalla! · retrieved 2026-11-17 · rev 1371761864
    Cite this reference

    MLA "Welcome to Valhalla!." Goetz, Brian. 2026-11-17. http://mail.openjdk.java.net/pipermail/valhalla-dev/2014-July/000000.html. Accessed 24 November 2026.

    Chicago "Welcome to Valhalla!." Goetz, Brian. 2026-11-17. http://mail.openjdk.java.net/pipermail/valhalla-dev/2014-July/000000.html.

    APA Goetz, Brian. (2026). Welcome to Valhalla!. Retrieved November 24, 2026, from http://mail.openjdk.java.net/pipermail/valhalla-dev/2014-July/000000.html

  2. JEP 401: Value Objects (Preview) · retrieved 2026-11-17 · rev 1371761864
    Cite this reference

    MLA "JEP 401: Value Objects (Preview)." Dan Smith, Alex Buckley, Brian Goetz (7 August 2026). 2026-11-17. https://openjdk.org/jeps/401. Accessed 24 November 2026.

    Chicago "JEP 401: Value Objects (Preview)." Dan Smith, Alex Buckley, Brian Goetz (7 August 2026). 2026-11-17. https://openjdk.org/jeps/401.

    APA Dan Smith, Alex Buckley, Brian Goetz (7 August 2026). (2026). JEP 401: Value Objects (Preview). Retrieved November 24, 2026, from https://openjdk.org/jeps/401

  3. Next generation Project Valhalla proposed; Value types, generic specialization, and enhanced volatiles top the wish-list for Project Valhalla · retrieved 2026-11-17 · rev 1371761864
    Cite this reference

    MLA "Next generation Project Valhalla proposed; Value types, generic specialization, and enhanced volatiles top the wish-list for Project Valhalla." Krill, Paul. 2026-11-17. http://www.javaworld.com/article/2385002/core-java/java-incubator-to-explore-technologies-for-java-10-and-beyond.html. Accessed 24 November 2026.

    Chicago "Next generation Project Valhalla proposed; Value types, generic specialization, and enhanced volatiles top the wish-list for Project Valhalla." Krill, Paul. 2026-11-17. http://www.javaworld.com/article/2385002/core-java/java-incubator-to-explore-technologies-for-java-10-and-beyond.html.

    APA Krill, Paul. (2026). Next generation Project Valhalla proposed; Value types, generic specialization, and enhanced volatiles top the wish-list for Project Valhalla. Retrieved November 24, 2026, from http://www.javaworld.com/article/2385002/core-java/java-incubator-to-explore-technologies-for-java-10-and-beyond.html

  4. Value types first, then we can talk about it · retrieved 2026-11-17 · rev 1371761864
    Cite this reference

    MLA "Value types first, then we can talk about it." @BrianGoetz (January 11, 2017). 2026-11-17. https://twitter.com/BrianGoetz/status/819272509535219712. Accessed 24 November 2026.

    Chicago "Value types first, then we can talk about it." @BrianGoetz (January 11, 2017). 2026-11-17. https://twitter.com/BrianGoetz/status/819272509535219712.

    APA @BrianGoetz (January 11, 2017). (2026). Value types first, then we can talk about it. Retrieved November 24, 2026, from https://twitter.com/BrianGoetz/status/819272509535219712

  5. Oracle Launches Project Valhalla for Java · retrieved 2026-11-17 · rev 1371761864
    Cite this reference

    MLA "Oracle Launches Project Valhalla for Java." Evans, Ben. 2026-11-17. http://www.infoq.com/news/2014/07/Project-Valhalla. Accessed 24 November 2026.

    Chicago "Oracle Launches Project Valhalla for Java." Evans, Ben. 2026-11-17. http://www.infoq.com/news/2014/07/Project-Valhalla.

    APA Evans, Ben. (2026). Oracle Launches Project Valhalla for Java. Retrieved November 24, 2026, from http://www.infoq.com/news/2014/07/Project-Valhalla

  6. https://openjdk.org/projects/valhalla/ openjdk.org/projects/valhalla/ · bare citation; no publisher or title recorded · Wikipedia revision 1371761864, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1371761864
    Cite this reference

    MLA "https://openjdk.org/projects/valhalla/ openjdk.org/projects/valhalla/ · bare citation; no publisher or title recorded · Wikipedia revision 1371761864, retrieved 2026-11-18." https://openjdk. 2026-11-17. https://openjdk.org/projects/valhalla/. Accessed 24 November 2026.

    Chicago "https://openjdk.org/projects/valhalla/ openjdk.org/projects/valhalla/ · bare citation; no publisher or title recorded · Wikipedia revision 1371761864, retrieved 2026-11-18." https://openjdk. 2026-11-17. https://openjdk.org/projects/valhalla/.

    APA https://openjdk. (2026). https://openjdk.org/projects/valhalla/ openjdk.org/projects/valhalla/ · bare citation; no publisher or title recorded · Wikipedia revision 1371761864, retrieved 2026-11-18. Retrieved November 24, 2026, from https://openjdk.org/projects/valhalla/

  7. JEP draft: Value Objects (Preview) · retrieved 2026-02-27 · rev 1371761864
    Cite this reference

    MLA "JEP draft: Value Objects (Preview)." 2026-02-27. https://web.archive.org/web/20220630163354/https://openjdk.org/jeps/8277163. Accessed 24 November 2026.

    Chicago "JEP draft: Value Objects (Preview)." 2026-02-27. https://web.archive.org/web/20220630163354/https://openjdk.org/jeps/8277163.

    APA encyclopegia.org. (2026). JEP draft: Value Objects (Preview). Retrieved November 24, 2026, from https://web.archive.org/web/20220630163354/https://openjdk.org/jeps/8277163

  8. JEP 401: Value Classes and Objects (Preview) · retrieved 2026-02-27 · rev 1371761864
    Cite this reference

    MLA "JEP 401: Value Classes and Objects (Preview)." 2026-02-27. https://openjdk.org/jeps/401. Accessed 24 November 2026.

    Chicago "JEP 401: Value Classes and Objects (Preview)." 2026-02-27. https://openjdk.org/jeps/401.

    APA encyclopegia.org. (2026). JEP 401: Value Classes and Objects (Preview). Retrieved November 24, 2026, from https://openjdk.org/jeps/401

  9. JEP 402: Enhanced Primitive Boxing (Preview) · retrieved 2026-02-27 · rev 1371761864
    Cite this reference

    MLA "JEP 402: Enhanced Primitive Boxing (Preview)." 2026-02-27. https://openjdk.org/jeps/402. Accessed 24 November 2026.

    Chicago "JEP 402: Enhanced Primitive Boxing (Preview)." 2026-02-27. https://openjdk.org/jeps/402.

    APA encyclopegia.org. (2026). JEP 402: Enhanced Primitive Boxing (Preview). Retrieved November 24, 2026, from https://openjdk.org/jeps/402

  10. JEP draft: Universal Generics (Preview) · retrieved 2026-02-27 · rev 1371761864
    Cite this reference

    MLA "JEP draft: Universal Generics (Preview)." 2026-02-27. https://openjdk.org/jeps/8261529. Accessed 24 November 2026.

    Chicago "JEP draft: Universal Generics (Preview)." 2026-02-27. https://openjdk.org/jeps/8261529.

    APA encyclopegia.org. (2026). JEP draft: Universal Generics (Preview). Retrieved November 24, 2026, from https://openjdk.org/jeps/8261529

  11. JEP draft: Value Object Storage Enhancements (Preview) · retrieved 2026-02-27 · rev 1371761864
    Cite this reference

    MLA "JEP draft: Value Object Storage Enhancements (Preview)." 2026-02-27. https://web.archive.org/web/20230925160139/https://openjdk.org/jeps/8316779. Accessed 24 November 2026.

    Chicago "JEP draft: Value Object Storage Enhancements (Preview)." 2026-02-27. https://web.archive.org/web/20230925160139/https://openjdk.org/jeps/8316779.

    APA encyclopegia.org. (2026). JEP draft: Value Object Storage Enhancements (Preview). Retrieved November 24, 2026, from https://web.archive.org/web/20230925160139/https://openjdk.org/jeps/8316779

  12. Value Types & List<int> coming for Java 10 ? · retrieved 2026-11-17 · rev 1371761864
    Cite this reference

    MLA "Value Types & List<int> coming for Java 10 ?." a b "Value Types & List<int> coming for Java 10 ?". 2026-11-17. http://literatejava.com/java-language/value-types-list-int-coming-java-10/. Accessed 24 November 2026.

    Chicago "Value Types & List<int> coming for Java 10 ?." a b "Value Types & List<int> coming for Java 10 ?". 2026-11-17. http://literatejava.com/java-language/value-types-list-int-coming-java-10/.

    APA a b "Value Types & List<int> coming for Java 10 ?". (2026). Value Types & List<int> coming for Java 10 ?. Retrieved November 24, 2026, from http://literatejava.com/java-language/value-types-list-int-coming-java-10/

  13. State of the Values · retrieved 2026-11-17 · rev 1371761864
    Cite this reference

    MLA "State of the Values." Rose, John; Goetz, Brian; Steele, Guy. 2026-11-17. http://cr.openjdk.java.net/~jrose/values/values-0.html. Accessed 24 November 2026.

    Chicago "State of the Values." Rose, John; Goetz, Brian; Steele, Guy. 2026-11-17. http://cr.openjdk.java.net/~jrose/values/values-0.html.

    APA Rose, John; Goetz, Brian; Steele, Guy. (2026). State of the Values. Retrieved November 24, 2026, from http://cr.openjdk.java.net/~jrose/values/values-0.html

  14. Project Valhalla · retrieved 2026-02-27 · rev 1371761864
    Cite this reference

    MLA "Project Valhalla." 2026-02-27. https://openjdk.org/projects/valhalla/. Accessed 24 November 2026.

    Chicago "Project Valhalla." 2026-02-27. https://openjdk.org/projects/valhalla/.

    APA encyclopegia.org. (2026). Project Valhalla. Retrieved November 24, 2026, from https://openjdk.org/projects/valhalla/

Cite this article

MLA

"Project Valhalla (Java language)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/project-valhalla-java-language. Accessed 24 November 2026.

Chicago

"Project Valhalla (Java language)." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/project-valhalla-java-language.

APA

encyclopegia.org. (2026). Project Valhalla (Java language). Retrieved November 24, 2026, from https://encyclopegia.org/wiki/project-valhalla-java-language

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Jyoti Gauba

enwiki · references available

Never Meant

enwiki · references available

Marcus M. Haskell

enwiki · references available

Aali Mosque

enwiki · references available

Eduardo Navarro (artist)

enwiki · references available

Sue Sisley

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1371761864 · 0.5 · snapshot enwiki-001371761864

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.