Re: [swift-evolution] Simplifying Default Access Modifiers

2017-02-13 Thread David Goodine via swift-evolution
I think having a different default access for nested-scope adds a significant amount of cognitive complexity for not much value. I understand that structs as nested types are often used to communicate values outside the score (internal even), so public will be required often in these cases.

Re: [swift-evolution] Mark protocol methods with their protocol

2016-09-16 Thread David Goodine via swift-evolution
I'm not familiar with all of the discussions in other threads relating to this issue that some are here, so forgive me if I'm running over old ground. Looking back at the original use case that David B. posted my first instinct was that this is a case that would best be solved by adding a

Re: [swift-evolution] guard let x = x

2016-10-26 Thread David Goodine via swift-evolution
;> On Oct 26, 2016, at 5:40 AM, David Goodine via swift-evolution >> <swift-evolution@swift.org> wrote: >> >> Hey all, >> >> As usual, apologies if this horse was beaten ages ago before I joined the >> mailing list, but thought I would bring

[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

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

2016-10-19 Thread David Goodine via swift-evolution
gt; wrote: > > >> On Oct 19, 2016, at 5:50 AM, David Goodine via swift-evolution >> <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> wrote: >> >> Hey all, >> >> I don’t know if this is really an ‘evolution’ topic per se, and I’m not o

Re: [swift-evolution] guard let x = x

2016-10-31 Thread David Goodine via swift-evolution
One thing I really like that Erica mentioned in the earlier discussion is the case of guard unwrapping [weak self] in closures. I've taken to creating an alternate self (guard let ss = self else { return }) constant and using that. But it always felt inelegant. The proposed case works without

Re: [swift-evolution] [Pitch] Replace the ternary operator with an in-language function

2016-10-26 Thread David Goodine via swift-evolution
-1 as well, particularly agreeing with Rimantas that removing something of use because it confuses new programmers is not a good motivation. To paraphrase Einstein, “A programming language should be as simple as possible, but no simpler.” -d > On Oct 26, 2016, at 6:26 AM, Rimantas Liubertas

[swift-evolution] guard let x = x

2016-10-26 Thread David Goodine via swift-evolution
Hey all, As usual, apologies if this horse was beaten ages ago before I joined the mailing list, but thought I would bring this up. I was typing the above (for the hundredth time) the other day and I was wondering whether it might be worth considering offering a shorter syntax: guard let x,