Data-oriented programming focuses on modeling data as data (instead of as objects). Records for data and sealed types for alternatives let us model immutable data where illegal states are unrepresentable. Combined with pattern matching we get a safe, powerful, and maintainable approach to ad-hoc polymorphism that lets us define operations on the data without overloading it with functionality.
5,777 views
14
6
3 days ago 15:57:48 30
Harvard CS50’s Introduction to Programming with Python – Full University Course