On Jul 24, 2015, at 19:19 , Roland King <r...@rols.org> wrote: > > let myVar = ( let ifNotOptional = something?.something else ) ? > ifNotOptional.stringName : “No Name” > > but can’t find any syntax to do something like that
Can’t you do something like: let myVar = something?.somethingElse?.stringName ?? “No Name” On Jul 24, 2015, at 19:43 , Greg Parker <gpar...@apple.com> wrote: > > You may prefer the new `guard let` construct for this pattern. Only when the guard let … else { … } block exits the current scope, though. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com