numbers v5.0.0-rc0 Numbers.Protocols
A set of protocols for the different numeric capabilities your data structure might provide.
In older versions of Numbers
, structures were required to follow a single, very strict, behaviour.
But because there are many different kind of structures that benefit from a numeric interface, including
those for which one or multiple of these operations cannot be (unambiguously) defined,
this has been split in these different protocols.
By using the different protocols, each data structure can ‘pick and choose’ what functionality is supported. As protocol dispatching is used, the result should be a lot faster than in older versions of Numbers, which performed behaviour-based runtime dispatch on the struct name.