Search results for

xcode github

92,017 results found

Post

Replies

Boosts

Views

Activity

Reply to guard vs control-flow-aware typing?
It is in effect the same thing. In particular, you can currently write this code (where x is a property of optional type):guard let x = x else {return} // 'x' is an unwrapped local for the rest of the scopeNote that it's not really unsafe, because you can't assign to the new 'x', and it has the same value as the old x.All that's really in question here is whether this sort of thing is always going to require an explict let x = x somewhere in the syntax, as above, or whether this in the future might be done silently by the compiler.
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15