Hacker News new | ask | show | jobs
by Glide 4381 days ago
The latter because of the runtime magic that it uses in NSManagedObject. Watching the WWDC 2014 talk states that the Swift team added @NSManaged so that it's possible to define models in Swift to be used in Core Data.

I also tried wiring up something really quickly in Typhoon (objc-ioc container) and it didn't work with a Swift class. I did do @objc on the class. Something about how properties are defined in Swift. It's pretty much expected because the runtime system is different.

Don't get me wrong, I'm not going to go "omg everything needs to be rewritten in swift!!!" but after trying a toy project or two in Swift, dealing with all of the implicitly unwrapped optionals from objective c code gets a wee tedious. It's a strange feeling. Like all the swift code is safe and the objc code is dangerous somehow. I can quickly see why people would want everything to be done in Swift.