[swift-evolution] Removing explicit use of `let` from Function Parameters

Douglas Gregor dgregor at apple.com
Thu Mar 17 13:58:34 CDT 2016



Sent from my iPhone

> On Mar 17, 2016, at 11:49 AM, Erica Sadun <erica at ericasadun.com> wrote:
> 
> The three reserved words are, if memory serves: let, var, and inout
> 
> var is gone. this would kill let. and `inout` is moved to modify types.

So by upending this part of the language we've managed to remove the special cases for argument labels. I view that as success. 

  - Doug


> 
> -- E
> 
> 
>>> On Mar 17, 2016, at 12:26 PM, Douglas Gregor via swift-evolution <swift-evolution at swift.org> wrote:
>>> 
>>> 
>>> On Mar 17, 2016, at 11:22 AM, Harlan Haskins <harlan at harlanhaskins.com> wrote:
>>> 
>>> Since we’re allowing keywords as argument names, shouldn’t this:
>>> 
>>> func foo(let i: Int)
>> 
>> Right now, you’d have to declare this as
>> 
>>   func foo(`let` i: Int)
>> 
>> but the proposal would fix that.
>> 
>>> be allowed, such that it’ll be called as this:
>>> 
>>> foo(let: 3)
>> 
>> Right.
>> 
>> 	- Doug
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160317/77a674ea/attachment.html>


More information about the swift-evolution mailing list