3 ms·
Hence why most should avoid floating point, yes. Many people approach them as "oh, they're decimals" when they absolutely are not... but there are no convenien
by Groxx 3y ago
Hence why most should avoid floating point, yes.
Many people approach them as "oh, they're decimals" when they absolutely are not... but there are no convenient alternatives in most languages. So people use the convenient one that they see 99% of other code using, rather than something that is more likely to fit their expectations.
That's the problem. People are surrounded by screws and hammers and they understandably choose to hammer in the screws rather than 1) knowing a screwdriver exists, and 2) hunting down the few three-handed screwdrivers in existence and trying to use them.
- constantcrying 3y agoThere is nothing which fits their expectations. There can not be. Floats are the best in almost every circumstance. Which is why they are the right default.
- Groxx 3y agoThat depends on their expectations, and is a matter of opinion. Clearly others disagree with you.
- constantcrying 3y agoFloats are still the only sane default.