[swift-evolution] Which functionality should be covered by a native Swift math/numerics library that ships with the standard lib?
Tino Heth
2th at gmx.de
Fri Aug 5 11:22:17 CDT 2016
> I don't think that non-type generic arguments are enough to create fixed-size arrays. How would you fill in `struct Vector<T, count: Int> { ... }`?
Fixed-size arrays could be initialized like current arrays:
You either give a value to repeat or an array-literal of the right size.
There could be a faillable initializer that takes an array of undefined size as well.
The data could be stored in a "normal" array, but I'd expect an implementation in the stdlib, so that working with raw memory would stay something that's not needed for most Swift developers.
> Seems to me that the first step would be actual language support for non-parametrizable fixed-size arrays.
Are you referring to literals here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160805/5d2da0e1/attachment.html>
More information about the swift-evolution
mailing list