Generic "math functions"

Parts of this thread remind me a lot of Comparable and FloatingPoint types (the digression about using the type system to get rid of nan) - and I can only repeat what I wrote there:
Wouldn't it be better to give the discussion about doing Math in a fundamental different way (compared to, let's say C) its own place?

As for the proposal:
I'd probably choose different names, but the one thing that's imho really remarkable is that this would finally add functionality to Swift that isn't part of the stdlib. This model could save hours of discussion wether an algorithm, operator or a type is important enough for inclusion - just stuff it into a fitting module (AdvancedCollections, FunctionalProgramming, VectorAlgebra…), and everyone could benefit from it.

3 Likes