> Le 31 mars 2016 à 23:41, Douglas Gregor via swift-evolution
> a écrit :
> :
> https://github.com/apple/swift-evolution/blob/master/proposals/0036-enum-dot.md
Wondering if this fit more in the lexer/in-house coding style bucket.
For the supplied example of
How would this work with OptionSetType? It also uses leading dot prefixes for
initialisers, but implementations are usually structs. If I understand
correctly, leading dot can be used in any case where the type can be inferred
by the compiler. Changing the rules for enums seems strange to me.
On Apr 2, 2016, at 11:13 AM, Dave Abrahams via swift-evolution
wrote:
> I believe I misread the proposal and you are right.
>
> I do have reservations about leading dot syntax that are highlighted by
> this sentence in the proposal:
>
> A leading dot has become a
> As as been pointed out in the past, why not make a leading dot mean static
> (including enum). This would be nice and consistent.
And it would break the common pattern of doing things like:
string.compare(otherString, options: [.caseInsensitive, .numeric])
Leading dot can only mean
As as been pointed out in the past, why not make a leading dot mean static
(including enum). This would be nice and consistent.
On Sunday, 3 April 2016, Dave Abrahams via swift-evolution <
swift-evolution@swift.org> wrote:
> Matthew Johnson via swift-evolution
>
Matthew Johnson via swift-evolution
wrote:
>
>> On Apr 1, 2016, at 4:07 PM, Dave Abrahams via swift-evolution
>> wrote:
>>
>> Douglas Gregor via swift-evolution
>> wrote:
>>> Hello Swift community,
>>>
>>> The
The correctness of this proposal seems somewhat self-evident.
+1.
Charles
> On Mar 31, 2016, at 10:41 PM, Douglas Gregor via swift-evolution
> wrote:
>
> Hello Swift community,
>
> The review of SE-0036 "Requiring Leading Dot Prefixes for Enum Instance
> Member
+1
On Thu, Mar 31, 2016 at 11:41 PM Douglas Gregor via swift-evolution <
swift-evolution@swift.org> wrote:
> Hello Swift community,
>
> The review of SE-0036 "Requiring Leading Dot Prefixes for Enum Instance
> Member Implementations" begins now and runs throughApril 5, 2016. The
> proposal is
Hello Matthew,
If the goal is to make rules for accessing static members and enum cases more
consistent, why can’t static members be accessed from inside the type cope with
a dot prefix (sorry for the grim example)?
struct Person {
static let lifeExpectency: Int = 80
let age: Int
+1 Same as Matthew Johnson said
On Friday, 1 April 2016, Matthew Johnson via swift-evolution <
swift-evolution@swift.org> wrote:
>
>
>- What is your evaluation of the proposal?
>
> +1. The current behavior is surprising in a somewhat confusing way.
>
>
>- Is the problem being addressed
> On Apr 1, 2016, at 4:07 PM, Dave Abrahams via swift-evolution
> wrote:
>
> Douglas Gregor via swift-evolution
> wrote:
>> Hello Swift community,
>>
>> The review of SE-0036 "Requiring Leading Dot Prefixes for Enum Instance
>> Member
Douglas Gregor via swift-evolution
wrote:
> Hello Swift community,
>
> The review of SE-0036 "Requiring Leading Dot Prefixes for Enum Instance
> Member Implementations" begins now and runs throughApril 5, 2016. The
> proposal is available here:
>
>
> What is your evaluation of the proposal?
+1.
In addition to bringing greater consistency, requiring the leading dot will
make it easier to grep one's codebase for enum case values.
> Is the problem being addressed significant enough to warrant a change to
> Swift?
Yes.
> Does this proposal
>
> What is your evaluation of the proposal?
Anything that increases consistency is good.
> Is the problem being addressed significant enough to warrant a change to
> Swift?
Yes.
> Does this proposal fit well with the feel and direction of Swift?
Yes.
> If you have used other languages or
+1 for this proposal. Seems very reasonable to reduce confusion with very
little overhead. It would enforce what people should already be doing.
___
swift-evolution mailing list
swift-evolution@swift.org
15 matches
Mail list logo