> On Sep 5, 2017, at 18:37, Nevin Brackett-Rozinsky via swift-dev > <swift-dev@swift.org> wrote: > > On Tue, Sep 5, 2017 at 6:08 PM, Slava Pestov via swift-dev > <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote: > We expect that “define your struct in C” is still the way to go for layout > compatibility with other languages and systems. > > Are there plans (however tentative) to eventually make it possible to specify > the exact memory layout of a struct in Swift? > > It seems like something we will have to tackle in order for Swift to become a > serious systems-level programming language.
There's nothing inherently wrong with having a 'packedLayout' attribute or similar (as long as the compiler can enforce alignment requirements for non-trivial types), but neither is it urgent since you can do the same thing in C. It's a feature that can be added at any time, just not to existing fixed-contents structs. Jordan
_______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev