[swift-evolution] Yet another fixed-size array spitball session
Tino Heth
2th at gmx.de
Wed May 31 12:38:12 CDT 2017
> My suggestion: have two constructors, StaticArray<T>(size: LiteralInteger, initialValue: T) and StaticArray<T>(dimensions: [LiteralInteger], initialValue: T)
That would give away the option of typesafe vector math, which I consider more valuable than the increased performance:
I don't want to write things like "Vector3D" and "Vector4D" to wrap a static array just to ensure that it has the right size, and I don't want to have runtime-checks which would decrease the performance-benefit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170531/fadd360b/attachment.html>
More information about the swift-evolution
mailing list