Sign up for FlowVella
Sign up with FacebookAlready have an account? Sign in now
By registering you are agreeing to our
Terms of Service
Loading Flow
What does Swift
look like?
1. Function accepts an arbitrary number of ints as input
2. Variable types can be inferred
3. Iterate over a collection. Loop variable type is inferred
4, 5: You’ve seen this before. No need to discuss further
6. Function sumNumbers is called with a collection of integers. Variable sum is a constant, defined by the let keyword.
7. Value is displayed to the console
“Objective-C without the C”
Initially described as “Objective-C without the C”, in some ways Swift actually moves closer to modern languages influenced by C and
C++.
It removes Smalltalk-like syntax for method calls, replaced with dot-notation similar to Scala, C++, Java, C#, and many other modern languages
Manning, Jon, Paris Buttfield-Addison, and Tim Nugent. Swift Development with Cocoa. O'Reilly Media, 2014