Swiftz icon indicating copy to clipboard operation
Swiftz copied to clipboard

One Num Typeclass to Rule Them All

Open CodaFi opened this issue 10 years ago • 2 comments

Swift has an... interesting approach to numeric protocols. It's a real helter-skelter mix of some that add operations, make things integer-y, make things floating-point-y, signal access times for collections-y, etc. What it doesn't do is actually define a good hierarchy of the values their numeric structures can represent. I think we can fix that.

The NInt et al machinery can be collapsed and reappropriated for arbitrary precision arithmetic (somehow. GMP, OpenSSL, CommonCrypto?). We can define proper numeric type classes and conformances for swift types and get real numeric constraints going for once.

CodaFi avatar Nov 19 '14 05:11 CodaFi

Bump #167.

CodaFi avatar Jan 29 '15 04:01 CodaFi

Almost fixed by #231

CodaFi avatar Aug 19 '15 16:08 CodaFi