[swift-evolution] [Planning][Request] "constexpr" for Swift 5

Dave Abrahams dabrahams at apple.com
Thu Aug 24 09:05:11 CDT 2017


on Mon Jul 31 2017, John McCall <swift-evolution at swift.org> wrote:

>> I see your point. Dynamically-sized in-place allocation is something
>> that completely escaped me when I was thinking of fixed-size
>> arrays. I can say with confidence that a large portion of
>> private-class-copy-on-write value types would greatly benefit from
>> this and would finally be able to become true value types.
>
> To be clear, it's not obvious that using an inline array is always a
> good move for performance!  But it would be a tool available for use
> when people felt it was important.

Just to point out that people may be missing the case of fixed capacity
variable sized arrays, which are an important component of a general
system for optimizing variably-sized data structures. Implementing such
an array without dynamic allocation requires language support.

Cheers,

-- 
-Dave



More information about the swift-evolution mailing list