We all know that swift has a strong type system, and as such I lean towards using this system to my advantage :)
Here\'s what Apple has to say about using the Any t
If you are using pure Swift (without the legacy Objective-C stuff) and you want an array where you can put Int(s), Bool(s) and String(s) then you need an array of Any.
let values: [Any] = [1, true, "I'm not a pointer!"]
Nope. Infact Int, Bool and String in Swift are struct(s).
The code above compile because the import Foundation does enable the bridge to Objective-C. This mean the Swift Int, Bool and String are allowed to be seen as objects by the compiler in order to preserve compatibility with Objective-C.
But as soon as you remove the import Foundation the code stop compiling.