Ushering out strlcpy()
Ushering out strlcpy()
Posted Aug 29, 2022 17:08 UTC (Mon) by NYKevin (subscriber, #129325)In reply to: Ushering out strlcpy() by Wol
Parent article: Ushering out strlcpy()
You can't just say "it's a number" and call it a day. The math doesn't work out. You have to make some sort of compromise, and operate on some computable subset of the real numbers, which in practice is going to be a great deal smaller than the computable numbers. You can shout in ALL CAPS about how programmers should not be required to think about that compromise, but clearly somebody has to, at some point. If you just want to make the accountants happy, then use some sort of decimal fixed point (like SQL's DECIMAL type) or something similar. That's not "just a number" because it still does intermediate rounding, but at least it's doing the rounding that accountants probably want it to do.
