If you think OOP is particularly well-suited to domain modelling, you should try the FP approach to domain modelling.
You will never be able to unsee the complexity inherent to OOP.
You will never be able to unsee the complexity inherent to OOP.
* Rust * Kotlin * Dart * Java
Yep, even Java. Check this out: https://blog.jdriven.com/2021/10/sealed-classes/
Here is an example comparing C# with F#, where the latter also algebraic data types: https://blog.ploeh.dk/2016/11/28/easy-domain-modelling-with-...
Today, you write it in a similar way you would write a match in Rust.
I would instead recommend searching for “functional programming and domain driven design”.