WHEN and NULL In Pattern Matching - Inside Java Newscast #24

preview_player
Показать описание

JEP 427 proposes two changes to pattern matching in switch: 1. Guarded patterns, which belonged to patterns, are replaced with when clauses, which belong to the case. 2. null needs to be handled by a specific case null.

____ Chapters ____

0:00 ➠ Schedule
0:33 ➠ Intro
1:03 ➠ JEP 427
1:56 ➠ JEP 427 - Case Refinement
3:59 ➠ JEP 427 - null Handling
5:52 ➠ Join Java!
6:10 ➠ Outro

Tags: #Java #JDK19 #OpenJDK #InsideJava #PatternMatching
Рекомендации по теме
Комментарии
Автор

"If you don't like the content, share it with your enemies" 🤣

juanc
Автор

Wanted to thank you for moving the picture, then watched the rest of the video.

carlogotz
Автор

Very informative update. Thanks for publishing!
❤‍🔥Java is awesome❤‍🔥

VisruthCV
Автор

How many times did you move that picture in the background? 😁

quazarstar
Автор

My vote on dealing with null in switch is: explicit case clause only. Exception to occur when null is fed to any switch not having an explicit null case. No use of catch-all case for this purpose. It adds nothing and its obviously confusing. "When" is fine, a reasonably powerful soln with maximal ease of understanding whilst limiting unnecessary complexity.

avallons
Автор

now I'm triggered, please move the picture back so it's lopsided, I can't handle change :)

brianwest
Автор

Can we move Optional to java.lang and deprecate null for removal please?

AlLiberali