3 ms·
I'm a huge fan of Objective-C - it's been around for ages (it actually predates Java) and it's design makes it enormously flexible. That said, it has it's probl
by bengotow 12y ago
I'm a huge fan of Objective-C - it's been around for ages (it actually predates Java) and it's design makes it enormously flexible. That said, it has it's problems: many people dislike the "brackets everywhere" syntax and it's compatibility with C constrains the compiler (you can actually write C in the middle of your Objective-C, move pointers around, etc.) In Objective-C, you can write code that looks fine at compile-time but still crashes the app, which is bad for us developers and bad for iOS as a platform.
Swift can be used to write first-class, native apps just like Objective-C and even used alongside Objective-C in the same project. It includes features borrowed from other modern languages (Rust, Go etc.), like generics, tuples and explicit optionals. Many of the features of Swift are designed to ensure that the compiler can catch issues at compile-time. It's much more difficult to write code that will crash a Swift app.
As a seasoned Objective-C developer I'll probably reminisce about the good old days when I swizzled methods and did all sorts of bad things, but it's a good move for the platform :-)