> On Jul 23, 2017, at 5:49 PM, David Sweeris via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> 
> On Jul 23, 2017, at 12:18, Taylor Swift <kelvin1...@gmail.com 
> <mailto:kelvin1...@gmail.com>> wrote:
> 
>> I don’t think tuples are a suitable replacement for FSAs. A tuple should be 
>> able to be broken up and optimized by the compiler, and have no contiguity 
>> guarantees in memory.
> 
> 
> C's static arrays are imported as tuples, which need at least some level of 
> contiguity guarantees to work. Even if tuples in general make that such a 
> guarantee, tuple-based FSAs could use the same compiler logic as imported C 
> arrays.

I think that’s supposed to be a workaround solution, not a map going forward. 
By having to support C-array conversion, tuples have to give up tuple-specific 
optimizations, like rearranging members and contiguity. Adding FSAs (with a 
distinct internal representation) will let the two have different optimizations.

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to