Re: [swift-evolution] [Accepted] SE-0115: Rename Literal Syntax Protocols

2016-07-11 Thread David Sweeris via swift-evolution
> On Jul 11, 2016, at 7:34 PM, Jacob Bandes-Storch wrote: > > I'd call it an antipattern: it pretty much defeats the purpose of having the > ExpressibleBy*Literal protocols. > > If you just want a type to be constructible from a value of some other type > (literal or not), that's what regular

Re: [swift-evolution] [Accepted] SE-0115: Rename Literal Syntax Protocols

2016-07-11 Thread Jacob Bandes-Storch via swift-evolution
I'd call it an antipattern: it pretty much defeats the purpose of having the ExpressibleBy*Literal protocols. If you just want a type to be constructible from a value of some other type (literal or not), that's what regular initializers are for. For example, in addition to its ArrayLiteralConverti

Re: [swift-evolution] [Accepted] SE-0115: Rename Literal Syntax Protocols

2016-07-11 Thread David Sweeris via swift-evolution
> On Jul 11, 2016, at 19:13, Jacob Bandes-Storch via swift-evolution > wrote: > > I'd be happy with a warning + fix-it too. > >> On Mon, Jul 11, 2016 at 5:05 PM, Xiaodi Wu wrote: >> Maybe just a warning + fix-it would be sufficient? >> >>> On Mon, Jul 11, 2016 at 19:02 Jacob Bandes-Storch vi

Re: [swift-evolution] [Accepted] SE-0115: Rename Literal Syntax Protocols

2016-07-11 Thread Jacob Bandes-Storch via swift-evolution
I'd be happy with a warning + fix-it too. What's the right way to do this? An attribute like "@implicit" on the initializers? Perhaps a special case in the compiler, since these are already "known protocol kinds"

Re: [swift-evolution] [Accepted] SE-0115: Rename Literal Syntax Protocols

2016-07-11 Thread Xiaodi Wu via swift-evolution
Maybe just a warning + fix-it would be sufficient? On Mon, Jul 11, 2016 at 19:02 Jacob Bandes-Storch via swift-evolution < swift-evolution@swift.org> wrote: > Tangential: Is there any way to make it impossible to call these > literal-initializers explicitly, instead requiring " as T" or just > ""

Re: [swift-evolution] [Accepted] SE-0115: Rename Literal Syntax Protocols

2016-07-11 Thread Jacob Bandes-Storch via swift-evolution
Tangential: Is there any way to make it impossible to call these literal-initializers explicitly, instead requiring " as T" or just "" in a typed context? I have seen several explicit calls of these initializers where literals would have been more appropriate, such as "Set(arrayLiteral: foo, bar)"

[swift-evolution] [Accepted] SE-0115: Rename Literal Syntax Protocols

2016-07-11 Thread Chris Lattner via swift-evolution
Proposal Link: https://github.com/apple/swift-evolution/blob/master/proposals/0115-literal-syntax-protocols.md The review of "SE-0115: Rename Literal Syntax Protocols " ran from Active review July 1...7. The proposal has been *accepted*: The community and core team agree that this proposal is a