4 ms·
problem of known types, or interfaces, as values is that conditions for the value format or validation changes based on context. so you might have a price that
by indulona 2y ago
problem of known types, or interfaces, as values is that conditions for the value format or validation changes based on context. so you might have a price that is valid in one context but not in another(like a negative value). the problem then occurs on the input where you might let in value that is valid on higher level but not on deeper level and by the time you detect it it might be too late(you have committed a transaction with invalid data).