[wp-trac] [WordPress Trac] #41366: WordPress makes uses of decimal prefix and uses binary multiplicator for constant memory size value
WordPress Trac
noreply at wordpress.org
Tue Jun 1 19:18:03 UTC 2021
#41366: WordPress makes uses of decimal prefix and uses binary multiplicator for
constant memory size value
-------------------------+----------------------
Reporter: sebm78 | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: General | Version: 4.8
Severity: trivial | Resolution: wontfix
Keywords: close | Focuses: ui
-------------------------+----------------------
Changes (by hellofromTonya):
* status: new => closed
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
Hello @sebm78,
Welcome to WordPress Trac! Thank you for your suggestion.
You're right. The naming is not "technically" accurate.
The existing constants are common, understandable, and recognizable. The
technically accurate acronyms are less so. As the coding standard is all
caps for constants, `KIB_IN_BYTES` does not quickly read as `Ki` which can
increase the cognitive complexity.
In addition, changing the changes would require duplicating each. How so?
The existing constant would move to a deprecated file. Why? To avoid a
breaking change for those plugins, themes, and scripts that use any of the
original constants.
The end result would be 4 additional constants that are technically
accurate but less readable for contributors. The benefit does not outweigh
the impacts.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41366#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list