I know it's a toy example, but it's a _really bad idea_ to use a float as a backing type for currency. https://stackoverflow.com/questions/3730019/why-not-use-doub...
Ha yes, very true!
11–13 of 13 posts
I know it's a toy example, but it's a _really bad idea_ to use a float as a backing type for currency. https://stackoverflow.com/questions/3730019/why-not-use-doub...
I know it's a toy example, but it's a _really bad idea_ to use a float as a backing type for currency. https://stackoverflow.com/questions/3730019/why-not-use-doub...
It's kind of amusing reading this as a Typescript dev because I'm so used to Typescript's expressiveness I couldn't really work out which trick it was trying to tell me was novel. The answer is structural typing (aka duck typing).