[swift-evolution] [Pitch] Swift needs fixed-size array

Karl Wagner razielim at gmail.com
Mon Apr 17 13:37:21 CDT 2017

> On 17 Apr 2017, at 19:52, Anders Kierulf via swift-evolution <swift-evolution at swift.org> wrote:
> Proposal: UnsafeMutablePointer almost provides what I need. However, it can only allocate memory on the heap, or it can take a given blob of memory and interpret it as something else. What’s missing is a way to allocate typed memory of a certain size on the stack or in a struct. For example, something like this, with support for subscripts, limited to value types:

What happens if you use alloca?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170417/d2a5c90c/attachment.html>

More information about the swift-evolution mailing list