Basics of the swift programming language , variable in the swift programming , constant in the swift programming , type safe language, optional in swift programming
basic of the swift programming , swift programming language, swift basic.
Basic of Swift Programming Language:-
Swift is new
programming language use for the iOS, macOS ,tvOS, and watchOS before swift for
these application development developer use c or c ++ .
Swift provide many
fundament form c or c++ like Int for the integer , float and Double for the
floating point number , string for the textual data and bool for the Boolean value.
And there are also three collection type array , set and dictionary , about
every collection type we read in details later.
Swift provide many
thing that is same in c and objective c but along with those all swift also
provide many advance feature like tuple that is used grouping the value.
Swift has many advance
feature optional is one of them , optional means either “there is a
value, and it equals x” or “there isn’t a value at all”
optional is used ot handle the absence of the value.
Not only are optionals
safer and more expressive than nil pointers in
Objective-C, they’re at the heart of many of Swift’s most powerful features.
Swift is type safe language
, it is very clear about their type you need not to tell about the type of the
variable .
Ex var number = 11
Here we not tell what
is type of number , swift compiler know itself the number is integer.
Comments
Post a Comment