Parsimonious Declarations

Hat tip to Erica Sadun for passing along this one. We can use a sort of Tuple-ish syntax to create a bunch of related references inline:

var(top,left,width,height)=(0.0,0.0,100.0,50.0)spaceship.width=width

Inline Closures

This technique has a few different applications, but one good example is capturing a value from a switchstatement inline:

enumTheme{caseDay,Night,Dusk,Dawnfuncapply(){// ...letbackgroundColor:UIColor={switchself{caseDay:returnUIColor.whiteColor()caseNight:returnUIColor.darkGrayColor()}}()// ... set backgroundColor on all UI elements}}