[swift-evolution] [swift-evolution-announce] [Review] SE-0087:	Rename lazy to @lazy
    Chris Lattner 
    clattner at apple.com
       
    Wed May 18 00:03:48 CDT 2016
    
    
  
> On May 17, 2016, at 9:14 PM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
> 
>> 	https://github.com/apple/swift-evolution/blob/master/proposals/0087-lazy-attribute.md
> 
> The proposal says this at the beginning:
> 
>> Swift's rule for attribues/keywords is that keywords usually modify type of variable; attributes do not.
> 
> [citation needed]
> 
> As far as I can tell, this is not true at all. Most declaration modifiers do *not* change the type of anything; as far as I can tell, only `mutating`, `nonmutating`, and possibly `optional` do. Meanwhile, several attributes—particularly `@noescape` and `@autoclosure`—*do* change the type. So where is this belief coming from?
Correct - the proposal is incorrect in this claim.  Swift's typical policy is that attributes do *not* modify the type of the declaration, which is why Swift 1 and 2 have used “lazy” instead of “@lazy”.
-Chris
    
    
More information about the swift-evolution
mailing list