[swift-evolution] Proposal Sketch: Bring flexible array members in as Array|UnsafeReference

Dmitri Gribenko gribozavr at gmail.com
Tue Dec 22 19:56:36 CST 2015

On Tue, Dec 22, 2015 at 2:29 PM, T.J. Usiyan via swift-evolution <
swift-evolution at swift.org> wrote:

> MIDIMetaEvent and MIDIEventUserData are both examples of framework
> provided types which rely on flexible member arrays. Their last member is
> (officially) an array of UInt8 with 1 element. In practice, developers are
> meant to allocate enough space for an array of the necessary length along
> with the rest of the struct.
> These members come into swift as single element tuples. I propose either
> automatic import of these as Array or UnsafeReference.

It is important to sketch out an implementation strategy for this proposal.


(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151222/a7e74d53/attachment.html>

More information about the swift-evolution mailing list