During an interview I was asked to outline the differences between structs and classes in Swift. Among my points, I made the argument that structs are stored in the stack (space for them is reserved at compile-time) whereas classes are stored in the heap (space is allocated at run-time).
The interviewer then said he would really test how deep my knowledge of Swift is and then asked me if structs are always stored in the stack. After some back and forth, he made this statement:
If a struct is more than 3 words long, then it is allocated in the heap
I have done some research online and I cannot seem to find this anywhere. Can anyone confirm or reject the validity of this statement? Also, feel free to add any relevant/valid information.