[swift-evolution] Hidden initiallizations ...

Andrey Tarantsov andrey at tarantsov.com
Tue Mar 29 06:02:58 CDT 2016


> Having more that one variable with the same name in one method is stupid and the language should prevent that at least. 

Actually, we're doing it all the time:

if let foo = foo {
  ...
}

var foo = foo

You can do this in a subscope, you can do this to the arguments, and you can do this to fields.

A.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160329/233ac232/attachment.html>


More information about the swift-evolution mailing list