3 ms·
> I have seen code that stored versions as floats and the dev was surprised that version 1.1 wasn't always equal to "1.1". And will break when the version reac
by lifthrasiir 4y ago
> I have seen code that stored versions as floats and the dev was surprised that version 1.1 wasn't always equal to "1.1".
And will break when the version reaches 1.10. While I agree we need a better way to teach this (e.g. inexact-exact distinction as in Scheme or more recently Pyret), that's as problematic as storing a telephone number as an integer (or worse, a FP number).
- rqtwteye 4y agoTotally agree that storing a version in a float is stupid but that's where we are :-(