Today we will discuss about one of the feature in which Objective-c is better than swift. We all have read Turtle & Rabbit story. To start with today's discussion, let's treat topic as turtle & rabbit race where Objective-c is Turtle & Swift is Rabbit. Today Discussion Topic: 1) Run Time Flexibility 2) Dynamism On Your Mark: Apple introduced swift with the tagline "more safer than Objective-C". As we know to win something, have to lose something . So to become safer swift becomes Statically Typed Language. Statically Typed Language is one which does type checking at compile time. However, the old turtle (Objective-C) is a runtime language i.e. Most of the linkage between your methods, ivar and classes are checked at runtime. What benefit you will get with run time flexibility? 1) Fix Critically issue in deployed application on app store : Method Swizzling can be used to fix any critical issue in the applic...
Arrangement: While working on a application you may have used some predefined values. The visibility of these values can be application level, feature level or class level. For the convenience we give name to these values and then use in the application. In this case the name given by you only representing the single value and it never change to represent some other value thats why it is called Constant. On the other hand variables are like us doing jobs in IT World and can switch from one organization( value ) to other. Like while choosing a partner for marriage you may choose best for you by seeing multiple persons and still after sometime you feel stuck. Same may happen you choose a best option to declare a constant and after sometime this constant can create a issue for you in code due to its scope or any other reason. On the other hand you may have a fixed mind that you always declare a constant in a same way in any situation like a love ma...