Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

From Final to Immutable: The not-so-final word on `final`

Автор: Java

Загружено: 2025-08-12

Просмотров: 12156

Описание:

Developers have often heard the advice to "prefer immutability". Immutability confers many advantages, since an immutable object can be only in one state and therefore can be shared freely with untrusted code and across multiple threads. Java’s main tool for managing immutability is `final` fields. Unfortunately, using `final` fields comes with limitations which restrict their use in many real-world applications.

While the compiler, and the `putfield` bytecode protect against errant writes to `final` fields, there are some gaps. For instance, `final` fields can be reassigned more than once, either inside the constructor, or even outside (e.g. using `setAccessible`). Because of this, `final` fields can't be trusted not to change (or to change only once), which undermines the integrity of Java applications, and precludes some important performance optimizations (such as constant-folding).

Moreover, initializaton of `final` fields is rather inflexible: they must be set eagerly, either during construction (for instance fields) or during class initialization (for static fields) - and in the exact order in which they have been declared. Because of this, initialization of `final` fields cannot be shifted in time, so as to reduce the overall burden on application startup.

In this talk we will look at some of the steps we're taking to address these limitations, and enable Java to take better advantage of immutable data.

Presented by Maurizio Cimadamore - Compiler Architect (Java Platform Group - Oracle) during the 2025 JVM Language Summit (CA, August 2025).

• Stable Values (Preview) ➤ https://openjdk.org/jeps/502
• JEP draft: Prepare to Make Final Mean Final ➤ https://openjdk.org/jeps/8349536
• JVMLS 2024 - A New Model for Java Object Initialization ➤    • A New Model for Java Object Initialization...  
•    • JVM Language Summit 2025   playlist
• JVMLS ➤ http://jvmlanguagesummit.com/

Tags: #Java #OpenJDK

From Final to Immutable: The not-so-final word on `final`

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

1B Rows with the Memory API - JEP Cafe #25

1B Rows with the Memory API - JEP Cafe #25

Андрей Кулешов — Не Spring'ом единым? Смотрим на Quarkus

Андрей Кулешов — Не Spring'ом единым? Смотрим на Quarkus

James Gosling on Java - Historical Oddities & Persistent Itches #JVMLS

James Gosling on Java - Historical Oddities & Persistent Itches #JVMLS

Новые лучшие практики Java от Стивена Коулборна

Новые лучшие практики Java от Стивена Коулборна

Профайлинг и отладка в Java: Java Flight Recorder, Mission Control и Visual VM

Профайлинг и отладка в Java: Java Flight Recorder, Mission Control и Visual VM

How to Debug - Lessons Learnt from 10 Years of Spring Boot

How to Debug - Lessons Learnt from 10 Years of Spring Boot

Java 21 ⮕ 25: Performance and Runtime Enhancements #RoadTo25

Java 21 ⮕ 25: Performance and Runtime Enhancements #RoadTo25

Garbage Collection in Java: Choosing the Correct Collector

Garbage Collection in Java: Choosing the Correct Collector

Почему ваш код не соответствует Python (и как это исправить)

Почему ваш код не соответствует Python (и как это исправить)

LLMs are caught cheating

LLMs are caught cheating

Know Your Java?

Know Your Java?

Ex-OpenAI Scientist WARNS:

Ex-OpenAI Scientist WARNS: "You Have No Idea What's Coming"

A New Model for Java Object Initialization

A New Model for Java Object Initialization

LLM и GPT - как работают большие языковые модели? Визуальное введение в трансформеры

LLM и GPT - как работают большие языковые модели? Визуальное введение в трансформеры

Valhalla Nullness Emotion by Rémi Forax

Valhalla Nullness Emotion by Rémi Forax

Stream Gatherers - Deep Dive with the Expert

Stream Gatherers - Deep Dive with the Expert

Java 24, Faster Than Ever

Java 24, Faster Than Ever

Дерек уходит из Veritasium?

Дерек уходит из Veritasium?

Сисадмины больше не нужны? Gemini настраивает Linux сервер и устанавливает cтек N8N. ЭТО ЗАКОННО?

Сисадмины больше не нужны? Gemini настраивает Linux сервер и устанавливает cтек N8N. ЭТО ЗАКОННО?

Бизнес-логика в dataclass, pydantic, attrs-классах или в обычных классах? ООП в Python

Бизнес-логика в dataclass, pydantic, attrs-классах или в обычных классах? ООП в Python

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com