Re: [swift-evolution] [RFC] Definitive Initialization and Incompatibilities with Fixed-size Arrays

2017-07-26 Thread Félix Cloutier via swift-evolution
Right now, it's marked as "maybe" in the generic manifesto . > There are a number of features that get discussed from time-to-time, while > they could fit into Swift's generics system, it's not clear

Re: [swift-evolution] [RFC] Definitive Initialization and Incompatibilities with Fixed-size Arrays

2017-07-24 Thread David Sweeris via swift-evolution
> On Jul 24, 2017, at 9:37 AM, Chris Lattner via swift-evolution > wrote: > > >> On Jul 23, 2017, at 4:27 PM, Félix Cloutier wrote: >> Well, fixed-size arrays don’t have initializers, for the same reason tuples don’t: they’re

Re: [swift-evolution] [RFC] Definitive Initialization and Incompatibilities with Fixed-size Arrays

2017-07-24 Thread Chris Lattner via swift-evolution
> On Jul 23, 2017, at 4:27 PM, Félix Cloutier wrote: > >>> >>> Well, fixed-size arrays don’t have initializers, for the same reason tuples >>> don’t: they’re compound types instead of named types and they literally >>> have nowhere to place initializer definitions. But

Re: [swift-evolution] [RFC] Definitive Initialization and Incompatibilities with Fixed-size Arrays

2017-07-24 Thread Félix Cloutier via swift-evolution
The mere virtue of a strong typealias won't provide an implementation of the Sequence protocol, and as was just established, the language isn't equipped to provide an automatic implementation through the standard library. Your suggestion is an entry point for compiler magic. If we get into that

Re: [swift-evolution] [RFC] Definitive Initialization and Incompatibilities with Fixed-size Arrays

2017-07-23 Thread Daryle Walker via swift-evolution
> On Jul 23, 2017, at 7:27 PM, Félix Cloutier wrote: > > I think I've already said that, but I agree that an incremental approach to > this would be better. > >> Le 23 juil. 2017 à 15:57, Chris Lattner a écrit : >> >> On Jul 22, 2017, at 3:03 PM,

Re: [swift-evolution] [RFC] Definitive Initialization and Incompatibilities with Fixed-size Arrays

2017-07-23 Thread Félix Cloutier via swift-evolution
I think I've already said that, but I agree that an incremental approach to this would be better. > Le 23 juil. 2017 à 15:57, Chris Lattner a écrit : > > On Jul 22, 2017, at 3:03 PM, Daryle Walker wrote: >>> In my opinion, there is an easy three step plan

Re: [swift-evolution] [RFC] Definitive Initialization and Incompatibilities with Fixed-size Arrays

2017-07-23 Thread Chris Lattner via swift-evolution
On Jul 22, 2017, at 3:03 PM, Daryle Walker wrote: >> In my opinion, there is an easy three step plan :-) to solving this problem, >> riffing on Array: > > Well, fixed-size arrays don’t have initializers, for the same reason tuples > don’t: they’re compound types instead of

Re: [swift-evolution] [RFC] Definitive Initialization and Incompatibilities with Fixed-size Arrays

2017-07-22 Thread Daryle Walker via swift-evolution
> On Jul 22, 2017, at 3:02 PM, Chris Lattner wrote: > > On Jul 18, 2017, at 1:00 PM, Daryle Walker via swift-evolution > wrote: >>> On Jul 17, 2017, at 3:26 AM, Félix Cloutier wrote: >>> >>> I think that you're getting ahead

Re: [swift-evolution] [RFC] Definitive Initialization and Incompatibilities with Fixed-size Arrays

2017-07-22 Thread Chris Lattner via swift-evolution
On Jul 18, 2017, at 1:00 PM, Daryle Walker via swift-evolution wrote: >> On Jul 17, 2017, at 3:26 AM, Félix Cloutier wrote: >> >> I think that you're getting ahead of yourself. Fixed-size arrays are still >> useful even if they have to have been

Re: [swift-evolution] [RFC] Definitive Initialization and Incompatibilities with Fixed-size Arrays

2017-07-18 Thread Daryle Walker via swift-evolution
> On Jul 17, 2017, at 3:26 AM, Félix Cloutier wrote: > > I think that you're getting ahead of yourself. Fixed-size arrays are still > useful even if they have to have been demonstrably initialized before you can > use dynamic indices with them. A ton of people have already

Re: [swift-evolution] [RFC] Definitive Initialization and Incompatibilities with Fixed-size Arrays

2017-07-17 Thread Félix Cloutier via swift-evolution
I think that you're getting ahead of yourself. Fixed-size arrays are still useful even if they have to have been demonstrably initialized before you can use dynamic indices with them. A ton of people have already gotten into the habit of writing `int foo[40] = {}` in C. I would like to

Re: [swift-evolution] [RFC] Definitive Initialization and Incompatibilities with Fixed-size Arrays

2017-07-16 Thread Daryle Walker via swift-evolution
> On Jul 13, 2017, at 1:41 PM, Daryle Walker via swift-evolution > wrote: > > As I understand it, Definitive Initialization means the Swift compiler will > make sure an instance is fully initialized before the first attempt to read > it. It does not require