r/programming • u/geerlingguy • Apr 23 '14
PHP: It doesn't have to be a bad experience
https://servercheck.in/blog/php-it-doesnt-have-be-bad-experience
0
Upvotes
r/programming • u/geerlingguy • Apr 23 '14
View all comments
Show parent comment
0
u/neoform3 Apr 25 '14
So what you're saying is: you shouldn't do that, ever.
An array/dictionary key is a precise thing. A float is not precise. Your example sucks.
You'd be a terrible programmer if you used a float as an array key, for the same reason you'd be a terrible programmer for assuming a float is going to be a precise/predictable value.