by danbruc · 12y ago · 0 comments
Doesn't sound very humble, this "HO".
Do you know how many programmers that run circles around you (and me) have done mistakes similar to what Doug describes?
And how many web developers don't know about or are unable to decide between different number types? JavaScript type coercion is such a mess, how could you get away without thinking about types, even though number types are usually not an issue?
Data manipulation beyond "pull out of database" or "submit user input to database" is a lot rarer in enterprise software like this than in scientific computing. I'm not saying it's bad to be aware of it, but software is more than numbers.
What was originally compared was different sized integral types.
What you are comparing is two numeric types that have a large semantic gulf (fractions vs integers).
So your point is disingenuous in the context of the former.
When it comes to integers you are right - signed and 32 bits is a viable choice in north of 90 % of all cases. And when I wrote you should be able to make good decision about the number type to use I was already thinking of all the number types, however I did not express this well. But then I really don't see a lot of difference between being able to choose between integer, floating point and decimal types on the one hand and various integer types on the other hand.
I do think that the difference between Integer/Fractional is important, but honestly if you're dealing with money you should be using some Money datatype that's smart about this instead of raw numbers.
For example, using Java's binarySearch on arrays of length over 2^30 was broken until 2006[0][1].
[0]: http://googleresearch.blogspot.com/2006/06/extra-extra-read-...
[1]: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=5045582