Re: [swift-evolution] [Planning][Request] "constexpr" for Swift 5

2017-08-06 Thread John McCall via swift-evolution
> On Aug 6, 2017, at 11:59 PM, Daryle Walker wrote: >> On Aug 1, 2017, at 2:58 PM, John McCall > > wrote: >> >>> >>> On Aug 1, 2017, at 9:53 AM, Daryle Walker >> > wrote: >>> On Jul 31, 2017, at 4:37 PM, Gor Gyolchanyan >>>

Re: [swift-evolution] [Pitch] #dup -- a duplication "macro"(?)

2017-08-06 Thread Daryle Walker via swift-evolution
> On Aug 3, 2017, at 12:39 AM, Daryle Walker wrote: > > After a few hours, I figured out what was bugging me. Variadic generic > parameters, and the existing variadic function parameters, CONSUME > arbitrarily long comma-separated lists. The #dup facility PRODUCES those > kinds of lists. The f

Re: [swift-evolution] [Planning][Request] "constexpr" for Swift 5

2017-08-06 Thread Daryle Walker via swift-evolution
> On Aug 3, 2017, at 8:20 PM, Karl Wagner via swift-evolution > wrote: > >>> The root cause, of course, is that the VLAs require new stack allocations >>> each time, and the stack is only deallocated as one lump when the frame >>> ends. >> >> That is true of alloca(), but not of VLAs. VLAs a

Re: [swift-evolution] [Planning][Request] "constexpr" for Swift 5

2017-08-06 Thread Daryle Walker via swift-evolution
> On Aug 1, 2017, at 2:58 PM, John McCall wrote: > >> >> On Aug 1, 2017, at 9:53 AM, Daryle Walker > > wrote: >> >>> On Jul 31, 2017, at 4:37 PM, Gor Gyolchanyan >> > wrote: >>> >>> Well, yeah, knowing its size statically is not a re

Re: [swift-evolution] [Pitch] New Version of Array Proposal

2017-08-06 Thread Daryle Walker via swift-evolution
> On Aug 3, 2017, at 7:20 AM, Tino Heth <2...@gmx.de> wrote: > > Hi Daryle, > > I think we agree a lot on the importance of fixed-size arrays, but have a > different opinion on which aspect is the most valuable… (so we now only have > to agree that mine is better ;-) ;-) > My motivation for FSA

Re: [swift-evolution] [Planning][Request] "constexpr" for Swift 5

2017-08-06 Thread Félix Cloutier via swift-evolution
> Le 6 août 2017 à 08:15, Karl Wagner a écrit : > >> >> On 4. Aug 2017, at 20:15, John McCall via swift-evolution >> mailto:swift-evolution@swift.org>> wrote: >> >>> >>> On Aug 4, 2017, at 1:19 PM, Félix Cloutier via swift-evolution >>> mailto:swift-evolution@swift.org>> wrote: >>> >>> Tha

Re: [swift-evolution] Why you can't make someone else's class Decodable: a long-winded explanation of 'required' initializers

2017-08-06 Thread Charles Srstka via swift-evolution
> On Aug 3, 2017, at 12:05 PM, Itai Ferber via swift-evolution > wrote: > > Thanks for putting these thoughts together, Jordan! Some additional comments > inline. > >> On Aug 2, 2017, at 5:08 PM, Jordan Rose > > wrote: >> >> David Hart recently asked on Twitter

Re: [swift-evolution] [Planning][Request] "constexpr" for Swift 5

2017-08-06 Thread John McCall via swift-evolution
> On Aug 6, 2017, at 11:15 AM, Karl Wagner wrote: > > >> On 4. Aug 2017, at 20:15, John McCall via swift-evolution >> mailto:swift-evolution@swift.org>> wrote: >> >>> >>> On Aug 4, 2017, at 1:19 PM, Félix Cloutier via swift-evolution >>> mailto:swift-evolution@swift.org>> wrote: >>> >>> Th

Re: [swift-evolution] [Planning][Request] "constexpr" for Swift 5

2017-08-06 Thread Karl Wagner via swift-evolution
> On 6. Aug 2017, at 17:15, Karl Wagner via swift-evolution > wrote: > > let newItems_heap = newItems.backing.isAllocatedInline ? > newItems(withBacking: newItems.backing.clone()) : newItems Should, of course, be: let newItems_heap = newItems.backing.isAllocatedInline ? Array(withBacking: n

Re: [swift-evolution] [Planning][Request] "constexpr" for Swift 5

2017-08-06 Thread Karl Wagner via swift-evolution
> On 4. Aug 2017, at 20:15, John McCall via swift-evolution > wrote: > >> >> On Aug 4, 2017, at 1:19 PM, Félix Cloutier via swift-evolution >> mailto:swift-evolution@swift.org>> wrote: >> >> That's not a concern with the `let` case that Robert brought up, since you >> can't mutate a `let` a