Sunday, June 15, 2014

Introduction to swift

Like most developers I found the introduction of swift to be very interesting.  One of the great barriers to iPhone development was the learning curve for Objective-C.  Swift seems like a very interesting development.  Instead of supporting an existing language they have added a new language that has attempted to diverge from C in many fashions.

Swift has an interesting grab bag of features that it looks like the language designers decided to toss in.

  • Explicit methods for having 'no value' instead of using null.  This means that you can bypass the need that Java has for Double vs double, etc..
  • Enhanced for loops that try to support more expressiveness in terms of what to iterate over
  • Support for more advance switch statements, with no default fall through (a cause of bugs for decades), but which supports 

For a greater introduction to swift the best place is of course Apple's Swift introduction.  It covers the basics of the language, but so far in my brief experiences with Swift there are some gotchas that I have found which were not immediately obvious from the book.

No comments:

Post a Comment