[swift-evolution] Hidden initiallizations ...
Biala
bialata at yahoo.com
Tue Mar 29 06:30:38 CDT 2016
And you are OK with that ????I can not imagine my team writing such code and me looking to 5 code reviews per day having to find out what the variable actually is every time :)
For me it is OK for student projects but not for big code that have to be supported for years ...
On Tuesday, March 29, 2016 2:02 PM, Andrey Tarantsov <andrey at tarantsov.com> wrote:
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/aa20428f/attachment.html>
More information about the swift-evolution
mailing list