Hello,
I just read Embedded Swift vision document, and got a question.
It says in Non-allocating Embedded Swift, we cannot allocate dynamic memory, therefore we cannot use even Array or Dictionary. Which are fundamental building block for most programs.
I like that idea and it seems possible to build some sort of static containers, but for that, it seems we need static memory layout support in Swift, which does not exist at this point. For example, like this C struct.
#pragma pack(1)
struct Sample1 {
int[100] field1;
char[100] field2;
};
Does that imply static memory layout feature will eventually be introduced in Swift?
Also, I am pretty sure that explicit memory layout control is a required feature in any kind of low level programming. As many interfaces require certain data layout.
What's core team direction for this?
Do we have any proposal for this?
I'd like to see the potential future direction. If core team is willing to push it, I think it would make Swift to be more considered as a viable option for low-level programmings.
Thanks.