[swift-evolution] What are the rules for including @ with attributes/keywords and the possibility of removing it
jgroff at apple.com
Mon Jan 11 12:14:34 CST 2016
> On Jan 11, 2016, at 9:49 AM, Brandon Knope via swift-evolution <swift-evolution at swift.org> wrote:
> Is there a particular reason why there is a @ prepending these attributes/keywords?
> func test(@autoclosure test: () -> Bool) -> Void
> func test(autoclosure test: () -> Bool) -> Void
> It seems cleaner/clearer without @ sprinkled everywhere, but what is the rationale behind needing the @ symbol?
Without the '@', you're declaring a parameter labeled 'autoclosure'.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution