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.
The text was updated successfully, but these errors were encountered:
@belkadan, thanks. I have just re-reviewed the guidelines. Thankfully it is not already a commonly rejected proposal. I will draft a proposal for submission to the swift-evolution@ mailing list.
Good suggestion, but has too many moving parts for it to be implemented in Swift v3
Document draft proposal at bugs.swift.org
The Swift Evolution Process (swift-evolution@), encourages focus on Swift v3 to minimise distractions (rightly so)
This leaves room for a potential implementation after Swift v3; I would like to keep SR-1134 open to document the draft proposal and for anyone else interested in contributing to it as well.
swift-ci commentedApr 3, 2016
Additional Detail from JIRA
md5: 5d89999f6f4efe7f2b7ae8a8b285acb9
relates to:
Issue Description:
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.
The text was updated successfully, but these errors were encountered: