Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah the Java team took the opportunity while introducing the new record feature to explicitly forbid mutating their final fields. Their intention is to eventually enforce the same invariants across all Java fields unless the JVM is passed an explicit opt-out flag. And if you're not reliant on any frameworks using reflection to modify final fields, there's already a flag you can use today which will instruct the JVM to "trust" and apply optimizations to `final`.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: