Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-08 Thread Chris Lattner via swift-evolution
> On Apr 6, 2016, at 9:27 AM, Jordan Rose via swift-evolution > wrote: > > >> On Apr 5, 2016, at 0:55 , Radosław Pietruszewski via swift-evolution >> wrote: >> >> As others noted: >> >> * the ability to say .min, .max, .blackColor(),

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-06 Thread Evan Maloney via swift-evolution
> Agreed. Let me ask the question differently: what value does the > leading `.` provide to the user of the language? I find the leading-dot syntax to be very useful; it's a pretty clear shorthand that I'm not referencing something at global scope. Here's a common example from our codebase:

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-06 Thread Jordan Rose via swift-evolution
> On Apr 5, 2016, at 0:55 , Radosław Pietruszewski via swift-evolution > wrote: > > As others noted: > > * the ability to say .min, .max, .blackColor(), etc is extremely useful. > Swift would be a lot worse off if only enum cases got their enum types > inferred,

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-05 Thread Radosław Pietruszewski via swift-evolution
As others noted: * the ability to say .min, .max, .blackColor(), etc is extremely useful. Swift would be a lot worse off if only enum cases got their enum types inferred, and for any other static member of a type I would have type the fully qualified name * the leading dot disambiguates the

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread T.J. Usiyan via swift-evolution
*like* types. I, at no point, said that they are types. Pointing out what they can't do is not a great stance, in my opinion, because some of those things are perfectly reasonable but simply might not have been considered or attempted yet. I am *not* arguing that they are types. I am arguing that

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread Brent Royal-Gordon via swift-evolution
> Because semantically they seem more like types unto themselves But they aren't types. * You can't declare a variable/property/parameter of a particular case. * You can't constrain a generic type parameter to a case. * You can't cast to a case with `as` and friends or test for a case with `is`.

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread T.J. Usiyan via swift-evolution
Because semantically they seem more like types unto themselves–which is why I disagree with the lower camel casing but I digress–and the fact that they are static members seems like an implementation detail more than anything else. TJ On Mon, Apr 4, 2016 at 10:15 PM, Joe Groff

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread Joe Groff via swift-evolution
> On Apr 4, 2016, at 6:27 PM, T.J. Usiyan via swift-evolution > wrote: > > Is a solution to this actually making the leading dot mean enum lookup, full > stop and allowing `Self.foo`? The case that that doesn't cover is static > members on a type other than `Self`.

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread T.J. Usiyan via swift-evolution
Is a solution to this actually making the leading dot mean enum lookup, full stop and allowing `Self.foo`? The case that that doesn't cover is static members on a type other than `Self`. I use it to great effect for standard instances of types, so I would appreciate *some* facility to provide

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread David Waite via swift-evolution
I believe the confusion comes from language references only using the leading dot to access enumerated values, and not to access an option set implementation or something like UIColor. I can’t speak to the compiler processing impact or language impact of potential conflicts of looking these up

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread Brent Royal-Gordon via swift-evolution
> When I have a context that demands an instance of a > particular enum type, I think it's reasonable to look up the names in > the enum without qualification, and I strongly question the value of > leading-dot syntax for general static member lookup. I would normally > never think of using it

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread Howard Lovatt via swift-evolution
Moving away from the compiler, I like the leading dot for the programmer to distinguish static and instance members. The 'missing' receiver natural means static to me. On Tuesday, 5 April 2016, Dave Abrahams via swift-evolution < swift-evolution@swift.org> wrote: > > on Mon Apr 04 2016, Joe

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread Dave Abrahams via swift-evolution
on Mon Apr 04 2016, Joe Groff wrote: >> On Apr 4, 2016, at 12:51 PM, Dave Abrahams wrote: >> >> >> on Mon Apr 04 2016, Joe Groff wrote: >> > On Apr 4, 2016, at 11:44 AM, Dave Abrahams wrote: on Mon

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread Dave Abrahams via swift-evolution
on Mon Apr 04 2016, Joe Groff wrote: >> On Apr 4, 2016, at 11:44 AM, Dave Abrahams wrote: >> >> >> on Mon Apr 04 2016, Joe Groff wrote: >> > On Apr 4, 2016, at 11:05 AM, Dave Abrahams via swift-evolution wrote: on

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread Joe Groff via swift-evolution
> On Apr 4, 2016, at 12:51 PM, Dave Abrahams wrote: > > > on Mon Apr 04 2016, Joe Groff wrote: > >>> On Apr 4, 2016, at 11:44 AM, Dave Abrahams wrote: >>> >>> >>> on Mon Apr 04 2016, Joe Groff wrote: >>> >> > On Apr 4, 2016, at 11:05 AM,

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread Joe Groff via swift-evolution
> On Apr 4, 2016, at 11:44 AM, Dave Abrahams wrote: > > > on Mon Apr 04 2016, Joe Groff wrote: > >>> On Apr 4, 2016, at 11:05 AM, Dave Abrahams via swift-evolution >>> wrote: >>> >>> >>> on Mon Apr 04 2016, Erica Sadun

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread Dave Abrahams via swift-evolution
on Mon Apr 04 2016, Joe Groff wrote: >> On Apr 4, 2016, at 11:05 AM, Dave Abrahams via swift-evolution >> wrote: >> >> >> on Mon Apr 04 2016, Erica Sadun asked: >> > >>> Can you ping me off-list or in another thread and explain what

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread Joe Groff via swift-evolution
> On Apr 4, 2016, at 11:05 AM, Dave Abrahams via swift-evolution > wrote: > > > on Mon Apr 04 2016, Erica Sadun asked: > >> Can you ping me off-list or in another thread and explain what the >> issues are? > > All of the following make

Re: [swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread Erica Sadun via swift-evolution
> On Apr 4, 2016, at 12:05 PM, Dave Abrahams via swift-evolution > wrote: > > > on Mon Apr 04 2016, Erica Sadun asked: > >> Can you ping me off-list or in another thread and explain what the >> issues are? > > All of the following make

[swift-evolution] My personal beef with leading-dot syntax

2016-04-04 Thread Dave Abrahams via swift-evolution
on Mon Apr 04 2016, Erica Sadun asked: > Can you ping me off-list or in another thread and explain what the > issues are? All of the following make me uncomfortable with our leading-dot thang: * The rules for lookup don't seem obvious to me. I admit this is very