all packages exported by a module with one statement • import module M; • with transitive dependencies • in case of a clash - import class explicitly ▶
Stream Gatherers - Deep Dive with the Expert: https://youtu.be/v_5SKpfkI2U Gatherers: The API Your Stream Was Missing: https://youtu.be/oVdWfU_IObY Hunting with Stream Gatherers: https://youtu.be/rvW8tu1n5x4 Extending Functional Pipelines with Gatherers: https://www.youtube.com/live/dxVDiJsyu3Y ▶
JEP 534 • • No need to do anything in Java 27 Reduce object headers from 96 bits down to 64 bits on 64-bit architectures ◦ ◦ ◦ • reduce heap size improve deployment density increase data locality Improve performance
• • • • • • • not reinvent the wheel, keep threads model carried by platform / OS threads under the hood cheap to start unmounting carrier threads when waiting, e.g. for IO always daemons, with normal prio allow thread-per-request nicely (with debugging, troubleshooting etc.) improve scalability for asynchronous style
• • • work nicely with Structured Concurrency run(Runnable r) or call(Callable c) where(--.) can be nested with its own scope as long as you don't mutate the darn thing!
code) = simplified reasoning and improved performance (ThreadLocal doesn't change and doesn't get deprecated, only having them for millions of Virtual Threads might be problematic)
• • • • • • • handling argument allowed before explicit constructor call: super(--.) or this(--.) allow computing and validating args don't allow conditional jumps work with records and enums as well can call static methods, not instance methods can assign instance fields, but not read them can read outer class fields ▶
456 When part of the matched record or the whole variable don't matter • Rekord(_): unnamed pattern • Rekord(int _): unnamed pattern variable • var _ = Rekord(int a): unnamed variable ▶
• • • many collections recognise the concept of sequenced items (sorted, FIFO, ...) thus they can allow get/add/remove on First/Last element and easy processing on reversed() collection SequencedCollection, SequencedSet, SequencedMap, Collections.unmodifiableSequencedCollection(seqColl) ▶