Instead abstraction opened for extension we have well defined set of domain data. In java there is still a "backdoor" to extends it. The whole concept will be part of dedicated workshop "data driven development".
TL;DR; - enum on steroids
Part of project Amber : https://openjdk.org/projects/amber/arrow-up-right RUN:
This is a general example fo sealed and "mostly sealed" hierarchies with exhaustive switch
RUN :
Attempt to implement Option known from scala and kotlin where pattern matching on functional types is a norm
Last updated 2 days ago
com.wlodar.jeeps.jep409sealed.Jep409SealedClassesDemo
com.wlodar.jeeps.jep409sealed.Jep409OptionDemo