←back to thread

611 points LorenDB | 1 comments | | HN request time: 0.223s | source
1. antirez ◴[] No.43909607[source]
You can have two arguments that are semantically as distinct and important as quantity and price and be both integers, and if you swap them is a big issue anyway. And you would be forced, if you like this kind of programming, to create distinct types anyway. But I never trust this kind of "toy" defensive programming. The value comes from testing very well the code, from a rigorous quality focus.