[SR-13983] AdditiveArithmetic misleading text #56378
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
conformances
Feature → protocol: protocol conformances
documentation
standard library
Area: Standard library umbrella
Additional Detail from JIRA
md5: c04775d9a8673c0e65501d08f090f9cb
Issue Description:
Conforming to the AdditiveArithmetic Protocol
To add
AdditiveArithmetic
protocol conformance to your own custom type, implement the required operators, and provide a staticzero
property using a type that can represent the magnitude of any value of your custom type.(emphasis mine). Not sure what the emphasized part is supposed to mean, but it certainly implies that the
zero
property has an associated type that can be different fromSelf
, which could in fact be very useful but isn't supported. If we're gonna say something aboutzero
here without changing the protocol it should be that it represents additive identity.The text was updated successfully, but these errors were encountered: