Apple's documentation states:
Classes and structures must set all of their stored properties to an appropriate initial value by the time an instance of that class or structure is created. Stored properties cannot be left in an indeterminate state.
I have also seen this question, but still wasn't able to find an answer.
// struct
struct FlickrObj { // No Error ????
var title : String
var photographer : String
}
// class
class FlickrObj { // will create error: Class 'FlickrObj' has no initializers
var title : String
var photographer : String
}
Apple says both classes and structs must set their stored properties but why doesn't the Struct give any compile time errors?