on Fri Jun 24 2016, Brent Royal-Gordon <swift-evolution@swift.org> wrote:

>> I don't have anything else to add to the concerns that have already
> been discussed, but I would like to reiterate on the fact that having
> the ,absoluteValue, property but without substituting 'abs' will
> induce a lot of programers to use it anyway and make mistakes.
>
> `FloatingPoint` seems to have a similar concept to `absoluteValue`
> that's called "magnitude", although there's no actual `magnitude`
> property. Would that be a better name for this concept?

That's not a terrible idea. :-)

> And if so, should it be on `Arithmetic`? I don't think the
> `FloatingPoint` spec actually specifies how absolute values should be
> handled (for that matter, I don't think this one does either), and
> currently it seems to come out of an `AbsoluteValuable` protocol that
> I haven't seen mentioned in either the Integer or FloatingPoint
> proposals.

Yes, that protocol should die as part of this.

-- 
Dave

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to