3 ms·
the other thing is, alot of "state" is emergent or can be derived... lots of people seem to not think in that way and complicate things with too many variables
by andrekandre 6y ago
the other thing is, alot of "state" is emergent or can be derived... lots of people seem to not think in that way and complicate things with too many variables
i see this kind of code alot:
person {
age: UInt
birthday: Date
}
whereas if you have any sense of when "now" is its much better to just calculate the age based on current date
person {
age: UInt {
birthday.YearsUntilNow() //slightly trivialized ^^
}
private(set) birthday: Date
}