4 ms·
ObjC is really just plain C, plus some Smalltalk-like semantics within the square brackets. This means you end up with all the "footguns" of C, plus dynamic OO
by chadzawistowski 11y ago
ObjC is really just plain C, plus some Smalltalk-like semantics within the square brackets. This means you end up with all the "footguns" of C, plus dynamic OO behavior.
Swift is like Rust in that it's intended to be fast, "safer", and compiles to LLVM bytecode. Also, Swift and Rust both use Option types for error reporting rather than exceptions or error codes.
In the same sense that Rust is a way to leave behind old C++ baggage, Swift is a way to leave behind old ObjC baggage such as header files, null pointer errors, and lack of real namespaces.
- cmyr 11y agoI wouldn't say optionals are necessarily for error reporting. According to this slide[0], actually, we're going to be getting a proper error-handling model in Swift 2— we'll hear more either today or tomorrow. [0] http://www.apple.com/live/2015-june-event/eda6e3f7-0fda-4b46-b428-94b7ac62cdec/ http://www.apple.com/live/2015-june-event/eda6e3f7-0fda-4b46...
- ptomato 11y agoYou can get an overview in the prerelease version of the Swift book - https://itunes.apple.com/us/book/swift-programming-language/id1002622538?mt=11 https://itunes.apple.com/us/book/swift-programming-language/...