Saturday, June 7, 2014

Linkery from WWDC 2014

The WWDC keynote - analysis  (

Note that at the 1:43 mark is when Swift is mentioned:
  • xcode 14 million downloads
  • objective  C has served for 20 years, but what if we did it without baggage of C - "did more than think of it"
  • swift - fast, modern, interactivity
  • type inferences, closures, generics, multiple return types, name spaces
  • native to cocoa same lvm compiler, same arc memmory management, same run time
  • work beside objcective C in same application
  • Use of "playgrounds" within Xcode - running code as you write it showing sidebar, can see imagefunctional - closure  on array elements
  • language guide (Swift eBook) and reference implementation available

Swift Kick in Head
  • Swift is like JavaScript in that a line break is enough to mark the end of a statement, and ending them with semicolons is optional
  • Swift associates types with variables. The compiler infers the variables’ types from the values assigned to them
  • Int, Float, Double, Bool, (whose values are true and false as opposed to Objective-C’s YES and NO) , String - forcing a Float type for what could be a double if type not specified -  var someValue:Float = 3.0
  • function definition example: func circleArea(circleRadius: Double) -> Double
Getting started with Swift

swift programming language intro

  • Playgrounds that allow you to experiment Swift and see the result in real-time. In other words, you no longer need to compile and run your app in the Simulator. As you type the code in Playgrounds, you’ll see the actual result immediately without the overheads of compilation.
  • Swift allows you to use nearly any character for both variable and constant names. You can even use emoji character for the naming
  • strings are represented by the String type - Whenever you assign a string as variable (i.e. var), the string can be modified in your code
  • Swift allows you to compare strings directly by using the == operator
  • Objective C you use the addObject: method of NSMutableArray to add a new item to an array. Swift makes the operation even simpler. You can add an item by using the “+=” operator
  • Swift only provides two collection types. One is arrays and the other is dictionaries.
  • You can define classes in a single file (.swift) without separating the external interface and implementation
  • Swift requires you to provide the default values of the properties or a ?.

Swift for scripting

Swift Flappy birds four hours

The Alt Conference -

Casa De Mora

Adding Juice

Cloud services

No comments:

Post a Comment