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

Douglas Gregor dgregor at apple.com
Thu Mar 17 19:07:03 CDT 2016


Yes, please file a PR. 

Sent from my iPhone

> On Mar 17, 2016, at 5:05 PM, Chris Lattner <clattner at apple.com> wrote:
> 
> Sure, I’m ok with that if that is what Doug prefers.
> 
> -Chris
> 
>> On Mar 17, 2016, at 4:54 PM, Nicholas Maccharoli <nmaccharoli at gmail.com> wrote:
>> 
>> Thank you for the feedback!
>> 
>> I checked SE-0003 again and didnt see explicit mention of this.
>> 
>> I would like to write up a quick proposal today if its ok.
>> 
>> Chris, I promise to make it very concise is it ok to send over a PR to swift evolution?
>> 
>> - Nick
>> 
>> 2016年3月18日金曜日、Chris Lattner<clattner at apple.com>さんは書きました:
>>> 
>>>>> On Mar 17, 2016, at 11:08 AM, Douglas Gregor via swift-evolution <swift-evolution at swift.org> wrote:
>>>>> 
>>>>> 
>>>>> On Mar 17, 2016, at 1:27 AM, Nicholas Maccharoli via swift-evolution <swift-evolution at swift.org> wrote:
>>>>> 
>>>>> ​As a follow-up to proposal SE-0003​: "Removing var from Function Parameters" being accepted,
>>>>> I think it might make sense to disallow explicitly declaring function parameters with the `let` keyword since function parameters are immutable by default.
>>>>> 
>>>>> Basically disallow writing functions like this:
>>>>> 
>>>>> func foo(let i: Int)  { ... }
>>>>> 
>>>>> and only allow the function above to be expressed as this:
>>>>> 
>>>>> func foo(i: Int) { … }
>>>> 
>>>> This makes perfect sense to me. Want to write up a proposal?
>>> 
>>> The intention was for this to be included as part of SE-0003.  If it wasn’t, then that was an accidental omission.  Do we really need a full proposal for that?
>>> 
>>> -Chris
>> 
>> 
>> -- 
>> 
>> All the best,
>> 
>> Nicholas
>> 
>> Linked in:
>> http://lnkd.in/328U22
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160317/33c4ce5f/attachment.html>


More information about the swift-evolution mailing list