[TYPO3-core] RFC #13645: Bug and Cleanup: t3lib_div::formatSize should use IEC prefixes and appropriate units
Sigfried Arnold
s.arnold at rebell.at
Thu Feb 25 11:00:18 CET 2010
Am 25.02.2010 10:33, schrieb Martin Kutschker:
> IEC abbreviations suck ;)
your oppionion ;)
> When I was young KB was fine for everyone. I don't want no stinking KiBs :)
When i was young, KB was fine for me too - the difference between KiB
and KB is only 2.4 %. Since the amount of data increases form year to
year the gap between the two calculation forms become larger and larger,
that leads to problems. GB vs. GiB is already 7.4 % difference.
But that was not my point.
Point is - calculations done with base 1024 but shown with SI prefixes
(base 1000) - thats wrong. As a stated before: IEC prefixes are correct
for base 1024, SI prefixes for base 1000.
As far as i see we have 3 options:
a) Change the calculation to base 1000 and use SI prefixes as default.
- this will break backwards compatibility because the current system
relies on base 1024 (i guess, there are some people out there, who use
custom stdWraps with selfmade labels. they will become wron then.)
+ will satisfy people like you
+ nicer code, more scalable code
b) Leave the Calculation at base 1024 and use IEC prefix as default.
+ this will be correct in a logical, technical and mathematical way
+ will be fully backwards compatible
+ nicer code, more scalable code
- it won't statisfy people like you, because you think they "suck"
c) Leave the configuration up to the user (with "b" als default config,
for backwards compatiblity or "a" for breaking backwards compatibility)
- will need another patch for config_defaults.php
+ will satisfy both (pro IEC and pro SI)
+ will satisfy even those who want to use binary calculation and si
prefix (wich is completly wrong)
+ will be correct in any manner, calculations will be done the right way
+ nicer code, more scalable code
gretings
Sigfried Arnold
More information about the TYPO3-team-core
mailing list