Simplicity and security are the basic ideas behind Swift's design.
Less input: No semicolon required? Represents optional, the parentheses require less, the initialization of arrays and dictionaries, and switch has no break
Borrowed a lot of ideas of functional programming
var and let represent variable and solid
Set, GET, Willset, Didset
Enhanced enumeration types
Type-safe language and type inference
function is a one-class citizen, closures
Type alias Typealias, from the idea of C/
An enhanced tuple (tuple) that can mix any number of any type. is useful for function return values.
Optional: Indicates that a value exists and is x, or that the value does not exist. can handle NULL, nil condition.? Represents the type that has been optional wrapped! Indicates that a value of type optional exists and there will be a run-time exception if it does not exist.
Nil is not the same in objective-c and Swift. Objective-c nil means that the pointer points to an object that does not exist. Swift's nil represents a state in which the variable has not been assigned a value.
operator Enhancement: = Do not return a value, avoid the error with = = for the conditional expression. By default, overflow is not allowed. Range Operator: ... (fully closed) and. (semi-closed).
Enhanced switch, supports range matching, supports tuple matching, supports match-time-value bindings, and WHERE clauses
Language features of Swift