Open mlhaufe opened 1 year ago
Object == closure == coalgebra. Unfold
ADT == Algebra. Fold
http://lambda-the-ultimate.org/classic/message7355.html#7446
Multimethods to unify ADT and Objects?
http://lambda-the-ultimate.org/classic/message7355.html#7488
"the defining property of an algebra says that every observation can be expressed as a fold, so fold is a `universal observation'"
Unified under a bialgebra. But what does that mean practically?
async only on objects? sync only on ADTs?
immutability on ADTs and mutability/side-effects in objects?
immutable objects can exist though: Value Objects. But should they?
Ref:
"data" for algebras "codata" for coalgebras (objects)
Object == closure == coalgebra. Unfold
ADT == Algebra. Fold
http://lambda-the-ultimate.org/classic/message7355.html#7446
Multimethods to unify ADT and Objects?
http://lambda-the-ultimate.org/classic/message7355.html#7488
"the defining property of an algebra says that every observation can be expressed as a fold, so fold is a `universal observation'"
Unified under a bialgebra. But what does that mean practically?
async only on objects? sync only on ADTs?
immutability on ADTs and mutability/side-effects in objects?
immutable objects can exist though: Value Objects. But should they?
Ref: