Re: [swift-evolution] Constant initialization and unreachable code.

2016-10-19 Thread David Goodine via swift-evolution
William and Alex, thanks for the reply. I’m aware of the compile-time option. My post was originally to ask if the difference between constant and closure initialization for constants was intentional (and likely to remain) or just a temporary idiosyncrasy. I find #ifdef to be ugly and like

Re: [swift-evolution] Constant initialization and unreachable code.

2016-10-19 Thread William Sumner via swift-evolution
> On Oct 19, 2016, at 5:50 AM, David Goodine via swift-evolution > wrote: > > Hey all, > > I don’t know if this is really an ‘evolution’ topic per se, and I’m not on > Swift Dev, but thought someone here could shed some light on this. > > Often when developing

Re: [swift-evolution] Constant initialization and unreachable code.

2016-10-19 Thread Alex Martini via swift-evolution
> On Oct 19, 2016, at 9:37 AM, Alex Martini via swift-evolution > wrote: > >> >> On Oct 19, 2016, at 4:50 AM, David Goodine via swift-evolution >> > wrote: >> >> Hey all, >> >> I don’t know if this is

Re: [swift-evolution] Constant initialization and unreachable code.

2016-10-19 Thread Alex Martini via swift-evolution
> On Oct 19, 2016, at 4:50 AM, David Goodine via swift-evolution > wrote: > > Hey all, > > I don’t know if this is really an ‘evolution’ topic per se, and I’m not on > Swift Dev, but thought someone here could shed some light on this. > > Often when developing

Re: [swift-evolution] Constant initialization and unreachable code.

2016-10-19 Thread Charlie Monroe via swift-evolution
Hi David, I find these warning useful at times, annoying at others - like in your case. I've personally come to a solution where I've declared a struct that contains these values: struct Debug { static let useFoo = true } if Debug.useFoo { print("yes") } else { print("no") } I've

[swift-evolution] Constant initialization and unreachable code.

2016-10-19 Thread David Goodine via swift-evolution
Hey all, I don’t know if this is really an ‘evolution’ topic per se, and I’m not on Swift Dev, but thought someone here could shed some light on this. Often when developing code, if I need create mode switches (constant Bools) so that I can move back and forth between different