[swift-users] module (de)-initialization

Jens Alfke jens at mooseyard.com
Mon Dec 19 18:50:57 CST 2016


> On Dec 19, 2016, at 12:37 AM, Mr Bee via swift-users <swift-users at swift.org> wrote:
> 
> Is there a way to print the 'i' of the let, and the 'i' of the loop, and the 'i' of the var, from inside of the for loop? I know it's a bad practice, but I'm just curious.

No, there is no way of referring to them because their names are shadowed by the inner variable. That’s why it’s a bad practice.

—Jens

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20161219/d3c048f5/attachment.html>


More information about the swift-users mailing list