It would be good to provide the Swift language/compiler the ability to pack certain type of Structs, similar to the __packed attribute provided by C/C++ compilers.
- This would certainly further the goal of using Swift as a systems programming language.
- Currently, one would have to write such code in C and then interface with it from Swift.
- The feature could be restricted to Structs which only contain certain named types.
I am not an expert on compilers or language design so I apologise if I am trivialising the matter.
Even if the above is not desirable, at the very least, I hope this issue stirs discussion and thought on the topic of being able to use Swift as a systems programming language, and how we could possibly ensure the runtime and standard library can be made to work with it accordingly.