Home > DeveloperSection > Interviews > Dynamic and Static Typing

Posted on    September-16-2015 11:43 PM

 iPhone iPhone  Ios  Objective C 
Ratings:
 1 Answer(s)
  531  View(s)
Rate this:

Tarun Kumar

Total Post:107

Points:535
Posted on    September-16-2015 11:43 PM

Static typed languages are those in which type checking is done at compile-time, whereas dynamic typed languages are those in which type checking is done at run-time. Static typed variables need not be defined before they’re used. This implies that static typing has to do with the explicit declaration (or initialization) of variables before they’re employed.
Objective-C is a dynamically-typed language, meaning that you don’t have to tell the compiler what type of object you’re working with at compile time. Declaring a type for a varible is merely a promise which can be broken at runtime if the code leaves room for such a thing. You can declare your variables as type id, which is suitable for any Objective-C object.

Don't want to miss updates? Please click the below button!

Follow MindStick