logoalt Hacker News

_kidliketoday at 8:52 AM1 replyview on HN

optional is not how algebraic data types are implemented in Java. Basically it's the combination of sealed types and records.


Replies

joe_mwangitoday at 9:06 PM

Until they implement member patterns. https://openjdk.org/projects/amber/design-notes/patterns/tow...