Re:Java record pattern matching in JDK 19
by viewfromafar on Saturday May 14, 2022 @02:59PM
(#31381188)
The PL crowd calls that type system feature "occurrence typing."
Re:Java record pattern matching in JDK 19
by SemanticStrengh on Saturday May 14, 2022 @03:04PM
(#31381230)
yes or flow typing https://en.wikipedia.org/wiki/Flow-sensitive_typing
It probably overlap with the research on gradual typing too
> Related, Typescript is the only language I know of that through flow analysis does not require you to redefine the variable. E.g. you can do something like
This is called smart casting and is widely used in Kotlin