3 ms·
For comparison I’d be happy to force a comparer and never assume anything. But the problem can also be flipped around and generalized to include formatting. To
by alkonaut 5y ago
For comparison I’d be happy to force a comparer and never assume anything.
But the problem can also be flipped around and generalized to include formatting. To seem well designed I think it should be symmetric in formatting/parsing wrt what must be provided. In formatting it’s more clear that the system must assume assume format, or some operations become unergonomic (once one wants to be sloppy and allow concatenation of string and int for example). But perhaps one could compromise and just allow ints (assume invariant) but not floats (require formatter).