2026-10-23 18:44 UTC
@cwebber@social.coop as a lua user, I enjoy representing integers as floating point from time to time. But no, it is not my preferred representation
Replies (2)
-
@mcc@mastodon.social 2026-10-23 18:48
@cwebber@social.coop It's just an integer, Christine. How big could it be? 16,777,216?
-
@tshirtman@mas.to 2026-10-23 19:10
@mcc@mastodon.social @cwebber@social.coop you brought back the cursed knowledge that javascript array indices are floats, because that's the number type in javascript and there are no other options, and now i have to inflict it on more people. But it's fine* because there is Number.MAX_SAFE_INTEGER (apparently 2^53-1) to tell you how big your number can be before causing issues, and for some reasons your arrays can't be that big anyway (which is probably a good thing). * for some value of "fine".