> Markdown version of [/events/world-congress-2024/sessions/326-algebraic-data-types](https://www.wearedevelopers.com/events/world-congress-2024/sessions/326-algebraic-data-types). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Algebraic Data Types + Pattern Matching = Elegant and readable Java code - **Date:** Friday, Jul 19, 2024 - **Time:** 11:40–12:10 (30 min) - **Room:** STAGE 2 (500) - **Event:** World Congress 2024 ## Recording [Watch recording](https://www.wearedevelopers.com/videos/947-algebraic-data-types-pattern-matching-elegant-and-readable-java-code) ## Description A talk that starts with a problem and ends up with an elegant implementation using Java's records, sealed types and pattern matching. It's all live coding! Project Amber is bringing lot of exciting features to Java. Records, sealed types and many pattern matching features are few important ones. Sealed types and records are the mechanisms to create sum- and product-types respectively. These are two important forms of ADT (Algebraic Data Types). Using ADT along with pattern-matching, we can create APIs that are hard to misuse and create programs that are easier to read. All in all, in the talk we start with a problem statement and a list of requirements and then we create an implementation step-by-step by introducing requirements one by one. While we do that we make use of records, sealed types and pattern matching in Java to create elegant solution with highly readable code. ## Speaker ### [Balkrishna Rawool](https://www.wearedevelopers.com/@balkrishna-rawool) IT Chapter Lead at ING Bank NV ## Related talks at this congress - [Modern Java](https://www.wearedevelopers.com/events/world-congress-2024/sessions/22-modern-java) — Ron Veen - [Java's Project Loom & Co - the end for reactive programming?](https://www.wearedevelopers.com/events/world-congress-2024/sessions/376-java-s-project-loom) — Jan Weinschenker - [Speak, Code, Deploy: Transforming Developer Experience with Voice Commands](https://www.wearedevelopers.com/events/world-congress-2024/sessions/65-speak-code-deploy) — Sami Ekblad - [Architecture Antipattern](https://www.wearedevelopers.com/events/world-congress-2024/sessions/48-architecture) — Andreas Voigt