I understand the spirit of exploration and fun that this was done with, however the author talks of using this in "production". This scares me. These types are not interchangeable.
I would love to see a disclaimer and/or a discussion of what can go wrong
EDIT:
If I add the floats 1.5 and 1.5 to get an integer, is the result 2 or 3?
I use the dot property conversion, not the overloading in general use. I also have such reservations about using overloading for casting in production. What I do use, is the series of extensions for single letter dot property conversions, the extensions without the protocol extending, that I also used in Swift 1.2. Sorry if that was unclear...
If you need to convert float to int, use an explicit rounding mode. Then adding 0.1f (or rather the closest fp approximation) ten times will round up to 10.
I would love to see a disclaimer and/or a discussion of what can go wrong
EDIT: If I add the floats 1.5 and 1.5 to get an integer, is the result 2 or 3?