🙄 people who blindly say "inheritance is bad" or "composition over inheritance" and mean "no inheritance" are just like followers of religion. Always repeating the same stuff without thinking and being completely convinced they are right. Nigh everything has a place and a valid usecase and just because you don't see it doesn't mean nobody else does.
Edit: Also "sum types" and "algebraic data types" are horrible names. Pretty much the equivalent of "imaginary numbers". What the fuck is a "sum type"? How do you "add" types together? Adding numbers makes sense, it has a real world equivalent. Two balls in a cup, add one ball and you have three balls in a cup. Add color to water and you have colored water. Simple. But types? The fuck?
str | int
is a sum type --> does that mean sum types are adding two spaces of possibilities together aka a union of two sets? The wikipedia article is so friggin bad at explaining it to people who aren't in the know.