News for hackers. Stuff that matters.
Re:Algebraic Data Types in Haskell by xwowsersx on Monday March 28, 2022 @12:21PM (#30832182)
Can you share some examples, please?
Re:Algebraic Data Types in Haskell by BoiledCabbage on Monday March 28, 2022 @01:57PM (#30833468)
Funny enough someone actually wrote a book on it.

Data Modeling Made Functional

https://www.amazon.com/Domain-Modeling-Made-Functional-Domai...

It's one of the better and more useful software engineering books I've read. Even if you don't use a functional programming langauge. It's about using Algebraic Data Types do model common problems in the day-to-day business domain (not typical academic problems).

It's a really simple and awesome presentation, and by the end you're dying for the ability to use this more so in the day to day job. Honestly after reading through it, trying to model problems in OOP just seems so unnecessarily obtuse.

The Scott Wlaschin also runs https://fsharpforfunandprofit.com

https://fsharpforfunandprofit.com/ddd/ - a link to a talk on it which is decent, but the book is much better.

Re:Algebraic Data Types in Haskell by xwowsersx on Monday March 28, 2022 @04:39PM (#30835279)
Thanks. I was asking specifically about accomplishing this in Python.