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

Erica Sadun erica at ericasadun.com
Thu Mar 17 13:49:51 CDT 2016


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.

-- 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 <mailto: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/2291fd51/attachment.html>


More information about the swift-evolution mailing list