[swift-evolution] Should we relax restriction on closing over outer scope in class declarations?

Guillaume DIDIER guillaume.didier at polytechnique.edu
Sat Dec 24 02:46:23 CST 2016


If I understand correctly we are speaking of class definitions inside functions, so this doesn't affect classes defined at the global scope, which are what the beginner will first be told. Teaching them about defining classes in other places would then wait until they know more about closure, scopes and variable capture.

I would suggest treating a class defined within a function body the same way a function defined within a function body would be.

Guillaume DIDIER (ASP)
Section Escrime, 3ème Compagnie, 
Promotion X 2014


—
ÉCOLE POLYTECHNIQUE
91128 PALAISEAU CEDEX
M. +33 (0)7 70 43 18 40
guillaume.didier at polytechnique.edu
www.polytechnique.edu
—

> Le 23 déc. 2016 à 23:49, David Sweeris via swift-evolution <swift-evolution at swift.org> a écrit :
> 
> 
>> On Dec 23, 2016, at 1:37 PM, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
>> 
>> This has been an idea brought up in the distant past about other features. The core team has said very clearly that they do not want "dialects" of Swift.
> 
> That puts the nail on it for me… if it’s already been rejected, I don’t want to rehash it.
> 
> - Dave Sweeris
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161224/a5243ea2/attachment.html>


More information about the swift-evolution mailing list