3 ms·
This applies for languages which can do static type checks. In JavaScript, there's no assurance that the object you've got even means 'area' to be a number. It
by desc 8y ago
This applies for languages which can do static type checks.
In JavaScript, there's no assurance that the object you've got even means 'area' to be a number. It could be a string indicating which warehouse the Box is in.
So yes, you bloody well bump the major version number and the consumer needs to check the errata. Pretending to maintain compatibility when you're actually messing with the meaning of things is not something which should be done silently. What happens when someone calls the 'area' setter? Does it trust the width or the height...?