I\'m just curious if Swift is dynamic like php or static, I mean can I generate classes while an application is running?
Generally you never say static language. You could say static type language or dynamic type language, and you could also say strong type language or not.
So java is a static type language as well as strong type language, because compiler has no ability to detect type automatically, so it's static, and type is strongly restricted so it's a strong type language as well.
And javascript is both a dynamic type language and non-strong type language. Because the compiler has ability to detect type during runtime, and type isn't strictly restricted as well.
So based on above examples, you could say as swift allows us to not declare type and leave to the compiler to detect type by it self, so swift is announced as a dynamic type language by Apple official. And it's also a strong type language for you should use type strictly, when even you haven't declare type, if the compiler detect it to be a String, then it isn't any other type.
Hope it's helpful.