Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2016-01-06 Thread Tahoma Toelkes via swift-evolution
+1 My sentiments exactly. As I was catching up on this thread, this was almost exactly the syntax I was already considering mentioning when I encountered Erica's reply. I don't know whether it will meet all requirements; however, from a readability perspective in both declarations and

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-21 Thread Chris Lattner via swift-evolution
> On Dec 21, 2015, at 10:52 AM, Joe Groff wrote: > >> >> -1 >> >> “inout” is intended to communicate (or at least hint at) the copy-in / >> copy-out behavior of the argument. It is also there to enable other >> parameter modifiers, which can enable other more advanced

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-21 Thread Chris Lattner via swift-evolution
Me too. -Chris > On Dec 21, 2015, at 10:44 AM, Kevin Ballard via swift-evolution > wrote: > > I agree 100% with everything Jordan said. > > -Kevin Ballard > > On Sat, Dec 19, 2015, at 07:06 PM, Jordan Rose via swift-evolution wrote: >> -1 to using '&' in the

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-21 Thread Joe Groff via swift-evolution
> On Dec 18, 2015, at 6:07 PM, Chris Lattner wrote: > > >> On Dec 18, 2015, at 5:23 PM, Joe Groff via swift-evolution >> > wrote: >> >> For Swift 3, we're planning to phase out 'var' parameters in functions, and

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-21 Thread Ricardo Parada via swift-evolution
> On Dec 19, 2015, at 4:10 PM, Erica Sadun wrote: > > What would the ramifications of the following be? Each addresses the > "confusable with labeling" issue but preserve the inout keyword. > > func foo(x: inout Int) > ... I think I like this one better than all the

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-21 Thread Matthew Johnson via swift-evolution
> On Dec 21, 2015, at 12:25 PM, Joe Groff via swift-evolution > wrote: > > >> On Dec 19, 2015, at 4:10 PM, Erica Sadun > > wrote: >> >> What would the ramifications of the following be? Each addresses the >>

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-21 Thread John McCall via swift-evolution
> On Dec 21, 2015, at 11:19 AM, Jordan Rose via swift-evolution > wrote: >> On Dec 21, 2015, at 10:27 , Joe Groff > > wrote: >> >> >>> On Dec 19, 2015, at 7:12 PM, Dmitri Gribenko via swift-evolution >>>

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-19 Thread Jordan Rose via swift-evolution
-1 to using '&' in the declaration; it's a sigil that doesn't mean anything as is. (I was originally on the side of using 'inout' at the call site as well, i.e. "swap(inout x, inout y)", but it was considered too verbose.) I don't like it as an attribute because attributes generally don't

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-19 Thread Dave Abrahams via swift-evolution
> On Dec 19, 2015, at 7:12 PM, Dmitri Gribenko via swift-evolution > wrote: > > On Sat, Dec 19, 2015 at 7:06 PM, Jordan Rose via swift-evolution > > wrote: > -1 to using '&' in the declaration; it's a

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-19 Thread Matthew Johnson via swift-evolution
> On Dec 18, 2015, at 8:52 PM, Dmitri Gribenko via swift-evolution > wrote: > >> On Fri, Dec 18, 2015 at 6:21 PM, Joe Groff wrote: >> >> On Dec 18, 2015, at 6:08 PM, Dmitri Gribenko wrote: >> There's also a possibility that

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-18 Thread Joe Groff via swift-evolution
> On Dec 18, 2015, at 5:33 PM, Dave Abrahams wrote: > >> >> On Dec 18, 2015, at 5:30 PM, Joe Groff via swift-evolution >> wrote: >> >> >>> On Dec 18, 2015, at 5:27 PM, Matthew Johnson wrote: >>> >>> +1. Can you

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-18 Thread Dave Abrahams via swift-evolution
> On Dec 18, 2015, at 5:30 PM, Joe Groff via swift-evolution > wrote: > > >> On Dec 18, 2015, at 5:27 PM, Matthew Johnson wrote: >> >> +1. Can you provide an example showing where you would place it though? > > Good question. Three

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-18 Thread Joe Groff via swift-evolution
> On Dec 18, 2015, at 6:08 PM, Dmitri Gribenko wrote: > > On Fri, Dec 18, 2015 at 5:23 PM, Joe Groff via swift-evolution > > wrote: > For Swift 3, we're planning to phase out 'var' parameters in functions, and >

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-18 Thread Dmitri Gribenko via swift-evolution
On Fri, Dec 18, 2015 at 5:23 PM, Joe Groff via swift-evolution < swift-evolution@swift.org> wrote: > For Swift 3, we're planning to phase out 'var' parameters in functions, > and we're also making it so that language keywords are valid argument > labels. With both of these changes pending, I have

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-18 Thread Chris Lattner via swift-evolution
> On Dec 18, 2015, at 5:23 PM, Joe Groff via swift-evolution > wrote: > > For Swift 3, we're planning to phase out 'var' parameters in functions, and > we're also making it so that language keywords are valid argument labels. > With both of these changes pending, I

Re: [swift-evolution] [Pitch] Replace 'inout' with '&'

2015-12-18 Thread Slava Pestov via swift-evolution
> On Dec 18, 2015, at 5:30 PM, Joe Groff via swift-evolution > wrote: > > >> On Dec 18, 2015, at 5:27 PM, Matthew Johnson wrote: >> >> +1. Can you provide an example showing where you would place it though? > > Good question. Three