3 ms·
> I would expect that "the reader" with "usual expectations" would be familiar with floating point operations Why? Why should every single programmer be expect
by lmm 5y ago
> I would expect that "the reader" with "usual expectations" would be familiar with floating point operations
Why? Why should every single programmer be expected to be an expert in this particular obscure datatype, to the point that it's ok for it to break all the normal rules that normal datatypes follow?
> How operators work is an attribute of the types the operators work on. str defines the + operator to mean concatenation, which is entirely different from the meaning of the + operator when applied to integers
It's not "entirely different". It conforms to the normal mathematical definition of + and has the properties that a reader would expect + to have (e.g. associativity). Defining to e.g. search strings would be bad and confusing.