Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-17 Thread plx via swift-evolution
Late, but +1 *overall*. For function signatures I am somewhat indifferent, honestly; I think having the option to move part of the `where` clause after the signature declaration is beneficial, but not hugely so. The reasoning here is simple: currently functions look like `func

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-16 Thread L. Mihalkovic via swift-evolution
Regards (From mobile) > On May 16, 2016, at 8:16 PM, Thorsten Seitz via swift-evolution > wrote: > > >>> Am 16.05.2016 um 17:04 schrieb Karl via swift-evolution >>> : >>> >>> internal func _arrayOutOfPlaceReplace >>> >>> (_ source:

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-16 Thread Thorsten Seitz via swift-evolution
> Am 16.05.2016 um 17:04 schrieb Karl via swift-evolution > : > >> internal func _arrayOutOfPlaceReplace >> >> (_ source: inout B, _ bounds: Range, _ newValues: C, _ insertCount: Int) >> where >> C.Iterator.Element == B.Element, >> B.Index == Int >> { >> >> Now only

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-16 Thread Austin Zheng via swift-evolution
+1. Non-type generic parameters can be handled if/when they are proposed after Swift 3. There have to be better ways to encourage proper organization of the elements of a method header than forcing a redundant and non-obvious conformance to 'Any'; if this is mandatory the proposal is fatally

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-16 Thread Thorsten Seitz via swift-evolution
Having to declare conformance to `Any` is just noise and should *not* be mandatory IMHO. -Thorsten > Am 16.05.2016 um 07:59 schrieb Pyry Jahkola via swift-evolution > : > > >> On 16 May 2016, at 01:45, Brent Royal-Gordon via swift-evolution >>

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-16 Thread Pyry Jahkola via swift-evolution
> On 16 May 2016, Thorsten Seitz wrote: > > Funny, for me reading a function is quite the other way around: > I prefer to first look at the function name and parameter list to give me an > idea of what the function will do (the parameter names help a lot). > Having instead first to memorize a

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-16 Thread Thorsten Seitz via swift-evolution
Funny, for me reading a function is quite the other way around: I prefer to first look at the function name and parameter list to give me an idea of what the function will do (the parameter names help a lot). Having instead first to memorize a list of types with all their constraints just builds

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-16 Thread Thorsten Seitz via swift-evolution
> Am 14.05.2016 um 20:19 schrieb Tony Allevato via swift-evolution > : > > On 2016-05-14 16:29:40 +, Haravikk via swift-evolution said: > >> On 14 May 2016, at 16:52, Tony Allevato via swift-evolution >> wrote: >>> To me, this makes

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-16 Thread Thorsten Seitz via swift-evolution
> Am 14.05.2016 um 17:52 schrieb Tony Allevato via swift-evolution > : > > On 2016-05-10 18:51:29 +, Chris Lattner via swift-evolution said: > >> Hello Swift community, >> The review of "SE-0081: Move where clause to end of declaration" begins now >> and runs

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-16 Thread L. Mihalkovic via swift-evolution
On May 16, 2016, at 12:45 AM, Brent Royal-Gordon via swift-evolution wrote: >> Being able to let the developer decide how to place relevant type >> information with the freedom of being able to keep some/all/none type >> information local and some/none/all extra

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-16 Thread Pyry Jahkola via swift-evolution
> On 16 May 2016, at 01:45, Brent Royal-Gordon via swift-evolution > wrote: > > I'm actually tempted to suggest that a conformance should be *mandatory* and > you should have to specify `Any` if you don't have anything more specific to > say about the generic

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-15 Thread Patrick Smith via swift-evolution
I tend to agree with Jon Shier, Karl Wagner, Nicola Salmoria, and Tony Allevato. I think moving `where` to the end hinders comprehension. The extra constraint abilities that Nicola brought up look interesting. > On 15 May 2016, at 1:52 AM, Tony Allevato via swift-evolution >

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-15 Thread Brent Royal-Gordon via swift-evolution
> Being able to let the developer decide how to place relevant type information > with the freedom of being able to keep some/all/none type information local > and some/none/all extra information moved to the end of the declaration. To be clear, I do think it makes sense to move *all* `where`

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-15 Thread Goffredo Marocchi via swift-evolution
Sent from my iPhone On 15 May 2016, at 15:05, Brent Royal-Gordon via swift-evolution wrote: >> There we are. I read the declaration of the function from beginning to end >> and gradually formed a rough understanding of it without needing to change >> my expectations

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-15 Thread Brent Royal-Gordon via swift-evolution
> There we are. I read the declaration of the function from beginning to end > and gradually formed a rough understanding of it without needing to change > my expectations halfway through. I still have doubts about 'insertCount', > but I was at least able to formulate an hypothesis about its use.

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-15 Thread Nicola Salmoria via swift-evolution
David Hart via swift-evolution writes: > > > Hi Karl, > > As author of this proposal, the one about constraints on associated types, and the one on type-aliases in protocols (all from the Generics Manifesto - original authorship to Douglas Gregor) I’d like to provide

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-15 Thread L. Mihalkovic via swift-evolution
> On May 15, 2016, at 9:17 AM, David Hart wrote: > > Hi Karl, > > As author of this proposal, the one about constraints on associated types, > and the one on type-aliases in protocols (all from the Generics Manifesto - > original authorship to Douglas Gregor) I’d like to

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-15 Thread David Hart via swift-evolution
Hi Karl, As author of this proposal, the one about constraints on associated types, and the one on type-aliases in protocols (all from the Generics Manifesto - original authorship to Douglas Gregor) I’d like to provide additional reasoning behind my wish to push this proposal through, as a

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-14 Thread Karl Wagner via swift-evolution
> IMHO proposals like this should never be discussed in the context of trivial > examples as the full scope of their value gets lost. I have written enough > generics code in other languages to appreciate the idea of a > 'headline-form-followed-by-the-details-idea' for any complex declaration.

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-14 Thread L. Mihalkovic via swift-evolution
Sorry... to be clear, I think what WHERE worked very well when included in each declaration, but that WITH works much better when ALL clauses are coalesced at the end. > On May 14, 2016, at 10:39 PM, L. Mihalkovic > wrote: > > My only reservation would be the

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-14 Thread L. Mihalkovic via swift-evolution
My only reservation would be the choice of WHERE which I would have kept for more *dynamic* situations int the language. My first choice for this would have been WITH which in my minds carries a more permanent, intemporal connotation in my mind. But that is off topic for this discussion. > On

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-14 Thread L. Mihalkovic via swift-evolution
> On May 14, 2016, at 9:43 PM, Pyry Jahkola via swift-evolution > wrote: > > Tony & Haravikk, > > (Reformatting your quoted examples just a bit…) > >>> It enables things like: >>> func someMethod(value: S) -> AnySequence >>> where S.Generator.Element

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-14 Thread Pyry Jahkola via swift-evolution
Tony & Haravikk, (Reformatting your quoted examples just a bit…) >> It enables things like: >> func someMethod(value: S) -> AnySequence >> where S.Generator.Element == T { ... } > > I'm not assuming that. Under the current syntax, I would format your example > as: > > func

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-14 Thread Tony Allevato via swift-evolution
On 2016-05-14 16:29:40 +, Haravikk via swift-evolution said: On 14 May 2016, at 16:52, Tony Allevato via swift-evolution wrote: To me, this makes declarations with complex sets of constraints much harder to read, because I have to hunt them down instead of

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-14 Thread Haravikk via swift-evolution
> On 14 May 2016, at 16:52, Tony Allevato via swift-evolution > wrote: > > To me, this makes declarations with complex sets of constraints much harder > to read, because I have to hunt them down instead of finding them all in one > place. Under this proposal, the

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-14 Thread Tony Allevato via swift-evolution
On 2016-05-10 18:51:29 +, Chris Lattner via swift-evolution said: Hello Swift community, The review of "SE-0081: Move where clause to end of declaration" begins now and runs through May 16. The proposal is available here:

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-14 Thread Nicola Salmoria via swift-evolution
> * What is your evaluation of the proposal? -1. I'm in strong agreement with what Karl Wagner and Jon Shier said. The current 'where' syntax seems perfectly fine to me. It puts the constraints in the logical place, next to the type declarations, which is clear and intuitive. The proposed

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-14 Thread Karl via swift-evolution
Oops, StringCollection and IntegerSequence are bad examples, because we’d need to improve existentials before it could apply to those specific examples. But that’s desperately needed anyway. I’d still recommend ‘Generalised Existentials’ (generics manifesto) + generic typealiases over moving

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-14 Thread Karl Wagner via swift-evolution
> * What is your evaluation of the proposal? -1 > * How much effort did you put into your review? A glance, a quick reading, or > an in-depth study? More than a quick reading, but not really “in-depth” study… > * Does this proposal fit well with the feel and direction of Swift? I don’t

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-14 Thread Jon Shier via swift-evolution
I notice now that the proposal does define how the change interacts with type declarations, in the grammar section. However, I still see that as an even worse change than in the function case. Jon Shier > On May 14, 2016, at 1:05 AM, Jon Shier wrote: > >> * What is your

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-13 Thread Jon Shier via swift-evolution
> * What is your evaluation of the proposal? -1 No one has been able to explain how this change improves readability, it just seems like it’s supposed to be self evident. I would argue that it makes the generic definitions less readable by separating declarations and their relevant where

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-13 Thread Brent Royal-Gordon via swift-evolution
> I’m a +1, however personally I’d prefer this to be optional my constraints > aren’t that complex, for example: > > func someMethod(value:T) { … } > > Personally I prefer to keep such simple cases as they are, but would happily > use the new ability to move more complex ones (e.g-

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-13 Thread Haravikk via swift-evolution
> On 10 May 2016, at 19:51, Chris Lattner via swift-evolution > wrote: > > * What is your evaluation of the proposal? I’m a +1, however personally I’d prefer this to be optional my constraints aren’t that complex, for example: func

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-12 Thread Thorsten Seitz via swift-evolution
> Am 10.05.2016 um 20:51 schrieb Chris Lattner via swift-evolution > : > > Hello Swift community, > > The review of "SE-0081: Move where clause to end of declaration" begins now > and runs through May 16. The proposal is available here: > > >

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-12 Thread Joe Groff via swift-evolution
> On May 11, 2016, at 10:23 AM, Joe Groff via swift-evolution > wrote: > >> >> On May 11, 2016, at 6:54 AM, Thorsten Seitz wrote: >> >>> >>> Am 11.05.2016 um 03:56 schrieb Joe Groff via swift-evolution >>> : >>>

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-12 Thread Krzysztof Siejkowski via swift-evolution
* What is your evaluation of the proposal? +1 More readable. * Is the problem being addressed significant enough to warrant a change to Swift? Yes. Current form of defining requirements makes deciphering the signatures with high number of requirements a logical riddle. * Does this proposal

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-11 Thread Thorsten Seitz via swift-evolution
> Am 11.05.2016 um 19:23 schrieb Joe Groff : > > >>> On May 11, 2016, at 6:54 AM, Thorsten Seitz wrote: >>> >>> >>> Am 11.05.2016 um 03:56 schrieb Joe Groff via swift-evolution >>> : >>> >>> > On May 10, 2016, at 4:19

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-11 Thread Austin Zheng via swift-evolution
Another idea: what about a comma separating the return type from the where clause? func myFunc(arg1: A, arg2: B) -> Bool, where A : CustomStringConvertible { ... } Best, Austin On Wed, May 11, 2016 at 1:56 PM, Hooman Mehr via swift-evolution < swift-evolution@swift.org> wrote: > How

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-11 Thread Hooman Mehr via swift-evolution
How about a more radical change that eliminates this entire concern and keeps the whole generics declarations in one place: Move the entire generic declaration with its brackets somewhere other than between function name and its parameters. I know this breaks the “norm”, but what do you

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-11 Thread Joe Groff via swift-evolution
> On May 11, 2016, at 6:54 AM, Thorsten Seitz wrote: > >> >> Am 11.05.2016 um 03:56 schrieb Joe Groff via swift-evolution >> : >> >> On May 10, 2016, at 4:19 PM, Douglas Gregor via swift-evolution wrote:

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-11 Thread Thorsten Seitz via swift-evolution
> Am 11.05.2016 um 03:56 schrieb Joe Groff via swift-evolution > : > > >>> On May 10, 2016, at 4:19 PM, Douglas Gregor via swift-evolution >>> wrote: >>> >>> >>> On May 10, 2016, at 3:46 PM, Jordan Rose via swift-evolution >>>

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-11 Thread Matt Whiteside via swift-evolution
+1, I like this one a lot. -Matt > On May 10, 2016, at 21:25, David Waite via swift-evolution > wrote: > >> >> https://github.com/apple/swift-evolution/blob/master/proposals/0081-move-where-expression.md >> >> * What is your evaluation of the proposal? >

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-10 Thread David Waite via swift-evolution
> > https://github.com/apple/swift-evolution/blob/master/proposals/0081-move-where-expression.md > > * What is your evaluation of the proposal? +1, I like the syntax and think it can clean up some parser ambiguities. Today, there are several formats using angle brackets: - a

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-10 Thread Joe Groff via swift-evolution
> On May 10, 2016, at 4:19 PM, Douglas Gregor via swift-evolution > wrote: > >> >> On May 10, 2016, at 3:46 PM, Jordan Rose via swift-evolution >> wrote: >> >> I think actual keyword “where” provides enough of a delimiter that it won’t

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-10 Thread Muse M via swift-evolution
** What is your evaluation of the proposal?* A novelty idea ** Is the problem being addressed significant enough to warrant a change to Swift?* Some programmers love compact code and make Swift no difference to other languages, change is indeed easier and almost no barrier for all level of

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-10 Thread Douglas Gregor via swift-evolution
> On May 10, 2016, at 3:46 PM, Jordan Rose via swift-evolution > wrote: > > I think actual keyword “where” provides enough of a delimiter that it won’t > be hard to put something before it, and it seems unlikely to me that we would > want to add anything after it

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-10 Thread Jordan Rose via swift-evolution
I think actual keyword “where” provides enough of a delimiter that it won’t be hard to put something before it, and it seems unlikely to me that we would want to add anything after it without some other delimiter. So I’m not too concerned. Jordan > On May 10, 2016, at 14:29, Hooman Mehr via

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-10 Thread Hooman Mehr via swift-evolution
Although handy for now, I am a bit concerned about moving `where` clause to the end of declaration. This reserves and occupies this wide open space at the end of declarations. I think we might find a better use for this space later as the language evolves. Any thoughts? > On May 10, 2016, at

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-10 Thread Brandon Knope via swift-evolution
What is your evaluation of the proposal? A big +1 Is the problem being addressed significant enough to warrant a change to Swift? Yes. This makes it much more natural to read methods and functions with generics. This also makes it more predictable to find where the method signature is

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-10 Thread Trent Nadeau via swift-evolution
- What is your evaluation of the proposal? - All the +1s. This is more consistent with `where` clauses elsewhere in the language and is much more readable. - Is the problem being addressed significant enough to warrant a change to Swift? - Yes. - Does this proposal fit well

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-10 Thread Erica Sadun via swift-evolution
Yes please. It is significant enough to warrant a change to Swift. http://ericasadun.com/2016/04/06/folding-generic-argument-lists/ It fits with the feel and direction of Swift. It makes Swift easier to format, read, and

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-10 Thread T.J. Usiyan via swift-evolution
* What is your evaluation of the proposal? +1 * Is the problem being addressed significant enough to warrant a change to Swift? yes * Does this proposal fit well with the feel and direction of Swift? yes * If you have used other languages or libraries with a similar

Re: [swift-evolution] [Review] SE-0081: Move where clause to end of declaration

2016-05-10 Thread Jose Cheyo Jimenez via swift-evolution
> On May 10, 2016, at 11:51 AM, Chris Lattner via swift-evolution > wrote: > > Hello Swift community, > > The review of "SE-0081: Move where clause to end of declaration" begins now > and runs through May 16. The proposal is available here: > > >