Tim Peters <tim.one@comcast.net>: > If you want to presume that users are idiots as well as simply > ignorant, then fixed_point_decimal() is what you want. > "decimal" leaves out the vital distinction between fixed and floating > semantics, which is more important to "good to the last penny" results than > the distinction between binary and decimal. I don't agree with that. The first and foremost reason why a penny-adder will get the right result with this type whereas he wouldn't with a Python float is that it's decimal and not binary. Floatness only becomes an issue when the number of dollars he's adding up becomes large enough. If it doesn't, he could do the same calculation on his floating-point-decimal calculator and get the right answer, too. So, no matter what it's called -- fixed, decimal, or even fixed_decimal, he's not going to be able to guess that he needs to use it, he's going to have to be told. Given that, there's no point in worrying about what naive users may or may not think when deciding on a name for this. And I think a name should be chosen which reflects what it is about this type that makes it useful. I agree that the non-floatness is important, but it seems to me that the decimalness is at least as important, too. You're going to have to face this issue if you ever want to add a floating decimal type as well. If the fixed decimal type is just called "fixed", what are you going to call a floating decimal? You can't just call it "float", because we've already got one of those! Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4