Overloaded Operators and float64
Finally, with Oden 0.3.1, overloaded operators are here! As soon as the first Protocol support was completed I started working on operators being aliases for built-in protocols methods, thus making it possible to overload them just like you would do with regular protocol methods.
And by having this new feature, Oden finally supports the float64
type from
Go. It couldn’t be added in a proper way until the operator overloading worked
as it does now, that’s why it took a while. The following program uses the
math.Pi
constant from Go, which is a floating point number.
Oden 0.3.1. is available in the Playground and the I’ve just added a new section on Protocols in the User Guide.