3 ms·
Scala also shines for this style of development. Sealed traits and case classes (algebraic data types) are a nice way to express many different types of data m
by dbattaglia 6y ago
Scala also shines for this style of development. Sealed traits and case classes (algebraic data types) are a nice way to express many different types of data models, including polymorphic types and state machines (its surprising how many "hidden" state machines live in your objects via Boolean and Enum fields).
I found this book very helpful in terms of thinking in a more functional type-driven way: https://www.manning.com/books/functional-and-reactive-domain-modeling https://www.manning.com/books/functional-and-reactive-domain.... It does eventually get into some deeper functional programming concepts but its still a nice read and easy to get into for anyone coming from more traditional object oriented coding.
- acp2020 6y agoAs much as I love Scala, partly those reasons you just described, it's compilation speed is just too slow for doing prototypes.
- dbattaglia 6y agoFor sure, the compilation times can get pretty bad with Scala, although I haven't found it too terrible on smaller prototype projects (I agree its still quite slow compared to some other languages though). These day's I've been using Bloop (https://scalacenter.github.io/bloop/ https://scalacenter.github.io/bloop/) which makes Scala compilation super fast. It keeps a hot compiler running in a daemon and takes incremental compilation to a whole new level for Scala, truly a game changer for me.