3 ms·
My feeling is that if Swift didn't have the requirement of very tight interop with Objective-C there would have only been one kind of object. Maybe just structs
by quux 2y ago
My feeling is that if Swift didn't have the requirement of very tight interop with Objective-C there would have only been one kind of object. Maybe just structs with the option of heap allocation/reference counting or something like that.
But that's not the world Swift was born into and so it has both classes that are optionally Obj-C compatible and structs