4 ms·
Looks great. But I wonder why there are platform requirements for what seems to me like pretty basic functions. In RandomSample.swift: // For log(_:) and ex
by zapnuk 6y ago
Looks great.
But I wonder why there are platform requirements for what seems to me like pretty basic functions.
In RandomSample.swift:
// For log(_:) and exp(_:)
#if canImport(Glibc)
@_implementationOnly
import Glibc
#elseif canImport(Darwin)
@_implementationOnly
import Darwin
#endif
1. Why aren't those 'basic' functions already implemented in swift, and part of a math package (or in numerics)?
2. Why release a package that does not support windows now that windows is officially supported?
- stephencanon 6y agoThey _are_ in Numerics (including Windows support). I think Nate is just trying to keep dependencies to a minimum, but feel free to raise an issue.
- pjmlp 6y agoSwift blog also has enough of such examples right on the introduction.
- hntestacc 6y agotest