Objective-c

This tag should be used only on questions that are about Objective-C features or depend on code in the language

Swift

Swift is a general-purpose, open-source programming language developed by Apple Inc

Faster slower compiler

Quality Example
More

"Swift s compiler is also doing a lot more than objective-c s compiler considering swift is more strongly typed and does not required specifying imports among other things"

from question "Xcode 6.1.1 Run on device slow "Copying Swift standard libraries""

Newer

"The swift compiler is doing a lot more and is quite a bit newer than the objective-c compiler so it unlikely it will be as stable fast for quite some time"

from question "What is wrong with syntax highlighter and autocompletion in Xcode with Swift"

Dramatically slower then

"The swift one is dramatically slower then objective-c implementation"

from question "Slow Swift Arrays and Strings performance"

More faster

"And also apple does might not confidently announce that swift is more faster than objective-c in all the cases"

from question "Performance of Swift vs Objective-C"

Code slower

"There are multiple reasons why the swift code is slower than the objective-c code"

from question "Slow Swift Arrays and Strings performance"

Slower

"Wouldn t swift be slower than objective-c in this case since it is layered on top of it"

from question "What is Swift doing behind the scenes when I add a target to a UIButton?"

Faster pure

"It is possible for swift to be faster than pure objective-c in things that you would traditionally use c or c++ for anyway"

from question "Swift optimization not working?"

Faster

"As craig revealed within the announcement of swift it is said to be faster than objective-c by far"

from question "Whats the cause, Swift is supposed to be that much faster than Objective-C?"

"The perf hit will be ridiculous i know apple say swift execute faster than objective-c but this is low level so it will be harmless"

from question "Language of choice for CoreAudio"

"Most importantly for your image processing app the compiler will optimize swift code to run faster than objective-c"

from question "Comparison between Swift and Objective C in Image Processing"

"My view is that if in some cases objective-c is faster than swift it doesn t mean that all over performance of swift is slower"

from question "Performance of Swift vs Objective-C"

"Bottom line i would personally hesitate to draw any simple conclusions of swift is faster than objective-c or vice versa"

from question "Swift vs Objective-C Fibonacci Sequence Speed Comparison"

"I don t think that as of today you can run these tests and determine with any certainty whether swift 1.0 is faster or slower than objective-c"

from question "Performance of Swift vs Objective-C"

Syntax new wise

Quality Example
More

"Im new to swift but i like it more than objective-c as it looks a bit like java does to me from syntax wise compared to objective-c"

from question "AVPlayer does not play Video, play Button with Line through"

More comfortable

"However i read that swift was the successor of objective-c and i would feel more comfortable with swift syntax"

from question "Can swift code be used in Codename One native code instead of Objective-C"

Applications older programming

Quality Example
Older

"As objective-c is the older programming language for ios or macos applications swift allows you to use those classes structs in your code"

from question "Swift 3: Date vs NSDate?"

More

"Writing swift 2.0 in my professional work my personal opinion is that it s indeed ready for enterprise applications -- maybe even more than objective-c ever were"

from question "IOS development with Swift for enterprise applications"

Use

Quality Example
More

"I use objective-c more than swift"

from question "Swift 2 - Check if an array contains a value from another smaller array"

"Also note that i use objective-c more than swift"

from question "How to use a variable to construct command"

Application fine unit

Quality Example
Application harder

"Injecting code in a swift application is harder than it was for an objective-c application but it s still possible"

from question "Is Swift vulnerable to code injection?"

Application much bigger

"Executable size of swift application is much bigger than size of objective-c application"

from question "Xcode Swift executable size much bigger than Objective-C executable"

More comfortable

"I have a objective-c application working fine and smooth to be more comfortable with swift i decided to write the unit tests for this app in swift"

from question "Convert NSArray of Custom objects to Swift array"

Familiar apps unfamiliar

Quality Example
Less familiar

"I m learning swift and much less familiar with objective-c but for the life of me i can t figure out how they are trying to achieve the goal stated as build list of encodings sorted and including only those with human readable names."

from question "Logically ANDing NSUInteger and String Type?"

More familiar

"This article seems to suggest that this is possible by swizzling a fake location into apple s cllocationmanager class to be used by other apps but i am unfamiliar with the objective-c code more familiar with swift"

from question "How can I set a fake location on iOS to be used by all apps?"

Better safer safe

Quality Example
Better

"Better if you have a code swift is better but is not problem objective-c"

from question "XCode - Add SSL Certificate to iOs Profile (Programmatically)"

"So i ve started learning swift because it looks way better than objective-c"

from question "Swift protocol method usage"

Easier

"Swift is neither easier to read nor understand than objective-c"

from question "Swift optimization not working?"

Less safe

"Swift in that case would not be safer but less safe than objective-c"

from question "How to make a Cocoa binding to a property of optional type in Swift 3?"

Readable print

Quality Example
More readable

"With swift the code is much more readable than with objective-c"

from question "Better JSON parsing implementation in Objective-c and best practices?"

Print more

"Objective-c print is more readable compared to swift"

from question "Printing a dictionary in Swift different from Objective-C. How to fix this?"

Class easier method

Quality Example
Much more free

"Objective-c is much more free and easy with types and compilation checks where swift isn t"

from question "Overriding UITextField delegate methods"

Lot smarter

"Swift is lot smarter than objective-c about singleton class"

from question "How to Implement Singleton class in Swift"

Much easier

"As you can see defining a singleton class in swift is much easier than in objective-c"

from question "Unable to create Singleton"

Better

"Swift also prevents us i believe from overriding a parent class s property but also still lets us observe changes to that property--this is much better than objective-c s approach"

from question "How can I override a setter from a SuperClass in Swift with XCode 6.3 Beta2?"

Cleaner

"Usually i find swift s method naming to be cleaner than objective-c s but init methods can be an exception"

from question "TimeIntervalSinceReferenceDate vs timeIntervalSince1970 vs timeIntervalSinceNow"

More static

"We ve seen that swift uses a more static method dispatch than objective-c which unless a class dervices from foundation nsobject prevents the style of swizzling based on remapping method implementations at runtime"

from question "Swift isa pointer remapping or other supported method swizzling"

Easier

"Download xcode free and learn objective-c or swift swift is easier to learn than objective-c"

from question "How do I write an application for Mac OSX from scratch?"

"On the other hand swift is easier to learn especially if you have objective-c background so it can be adopted during the time slowly and paralelly with using objective-c"

from question "Learn Objective-C or Swift"

"Early this month i started learning swift as i found it fun and easier than objective-c"

from question "Swift 3: Populating plist data to UITableView"

Others

Quality Example
No longer visible

"However when i switch to swift 4.0 the methods declared in swift is no longer visible in objective-c"

from question "Swift method not visible in objective C"

More sensible

"Note that swift s arrays are much more sensible than objective-c s"

from question "Commonly used array option in Objective-C"

More strictly

"Swift is more strictly typed than objective-c"

from question "Swift - extract data from dictionary"

More effective

"After reading some related articles i don t think swift is more effective than objective-c"

from question "If Swift will replace Objective-C in the future"

Better

"I feel swift is better than objective-c in many aspects but my major question is - will swift dynamic libraries support older version of swift"

from question "Are Swift dynamic libraries backward compatible with older swift version projects"

Api easier

"Adding lightweight generics to your objective-c api makes it easier to interface with swift because your api gets translated more precisely"

from question "What type of class definition is this: ClassName<Variable> : parent"

Less type-safe

"So it should have always been gkagent under objective-c in order to be strictly correct however objective-c is less type-safe than swift so you could get away with it with the possibility that you d get an unrecognized selector exception if a gkagent object was ever passed to the delegate method and you assumed it was a gkagent2d"

from question "The protocol method of GKAgentDelegate is not right in Swift?"

More just

"The swift designers went through a lot of trouble to make sure that it s more than just objective-c without the constraints of c in fact i almost wish they hadn t said that since it s so often misquoted"

from question "Can you use Swift as a web programming language?"

Example more complex

"As you can see the swift example is more complex and error prone than your objective-c code"

from question "Dynamically create objects and set attributes in swift"

Greater

"I know that swift is buggy as heck i run into bugs everyday but ill bet objective-c was even worse when it started out benefits of hindsight so in a couple of years swift will be equal or greater than objective-c keeping its basic simplicity as well"

from question "Why does Apple use Obj-C for their internal code rather than Swift"

Fewer situations

"Swift will incur this penalty in fewer situations than objective-c will for instance method calls to swift-only protocol methods do not hit objc_msgsend but if the protocol is declared in objective-c or if the swift protocol is decorated with objective-c such that it can be adopted by objective-c objects as well then method calls to methods in that protocol adopted by swift objects appear to be dispatched via objc_msgsend"

from question "Whats the cause, Swift is supposed to be that much faster than Objective-C?"

Clearer

"Swift is clearer on versions releases and i keep asking myself if i am missing something related to objective-c since i can t find this information"

from question "How does Objective-C get updated? Are there versioned releases? What is the current 'version'?"

Less dynamic

"Swift seems to be less dynamic than objective-c in these stuffs"

from question "Swift's equatable protocol conformance check"

Dictionary more

"This is because the swift dictionary is more strongly typed than the objective-c nsdictionary"

from question "Type Error in closure (translated code from obj c to swift)"

Better deal

"Or is it merely a hint to whatever tool converts between swift and objective-c to better deal with swift optionals"

from question "Are _Nullable and _Nonnull useful for anything other than Swift interop?"

More

"Swift won t allow you to do absolutely everything that objective-c does but it will allow you to do almost everything and the code will be probably more robust considering that swift is more modern language with stronger typing than objective-c"

from question "IOS 9, Swift 2.0 , Xcode and testing"

"Personally i prefer objective-c because you can use c very easily as anything that is legal in c is also legal in objective-c added to which swift is a more procedural in style where objective-c is quite clearly object orientated"

from question "Can Swift do everything that Objective-C can do?"

"One of the reasons we want to move is because swift is more secure than objective-c"

from question "Are there security concerns I should keep in mind when converting my app from Obj-C to Swift?"

"If you get a difference between swift and objective-c it s more because swift is probably better on optimisation"

from question "ViewDidLoad not called when initialising obj viewcontroller from Swift"

"Specifically it makes it possible to write objective-c code that plays nicely with swift which is more strongly typed than objective-c"

from question "Difference Between __kindof and not Using it in Objective-C"

"No objects come magically into existence in swift any more than in objective-c"

from question "Objective -C vs. Swift Custom Initializers"

"I also use objective-c more than swift but here s what my guess is as to what the objective-c code would come to"

from question "Passing data between interfacecontrollers not working in apple watch"

Less dynamically

"But swift is less dynamically typed than objective-c and has less support for reflection"

from question "Swift iOS take in a input and use it for function name"

Safer

"Apple seems to claim that the optional type in swift is safer than nil in objective-c but i don t understand why this is so"

from question "What makes Swift's "Optional" safer than Objective-C's "nil"?"

Stricter

"Swift is stricter about runtime type correctness than objective-c so duck typing alone is not enough"

from question "Swift convenience initializer extension for SKPhysicsBody"

"Furthermore swift is stricter than objective-c when it comes to initialisers"

from question "Initializers construction in Swift"

Much nicer

"I find that objective-c is much nicer for working with core audio than swift"

from question "How to obtain audio chunks for analysis in core audio or AVFoundation"

Larger

"You will notice that swift bundles are always about 4-5 mb larger than their objective-c counterparts and this is precisely why"

from question "Will Swift 2 apps works after Swift 3 released?"

-documentary more content

"Objective-c -documentary provides more content than the documentary for swift"

from question "How to create a foldable NSLog-Output using Swift?"

Runtime smaller

"The swift runtime is smaller than the objective-c runtime"

from question "How are method calls implemented in the runtime?"

More understandable

"Those attributes let you create objective-c code which is more understandable by swift and complier warn you when you break the rule for example"

from question "What do the null-related property attributes in XCode do?"

Less complicated

"It seems to me that swift would be way simpler to learn then objective-c for beginners i know because i learned it in like 2 months and swift is less complicated and better laid out then objective-c"

from question "Why does Apple use Obj-C for their internal code rather than Swift"

Significantly more secure

"While i think the move to swift is prudent but i think it overstates the case to argue that swift is significantly more secure that objective-c"

from question "Are there security concerns I should keep in mind when converting my app from Obj-C to Swift?"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-3.0