[Review] SE-0040 Replacing Equal Signs with Colons For Attribute Arguments


(Chris Lattner) #1

Hello Swift community,

The review of “Replacing Equal Signs with Colons For Attribute Arguments” begins now and runs through March 4, 2016. The proposal is available here:

Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at:
  https://lists.swift.org/mailman/listinfo/swift-evolution

or, if you would like to keep your feedback private, directly to the review manager. When replying, please try to keep the proposal link at the top of the message:

What goes into a review?

The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:

  • What is your evaluation of the proposal?
  • Is the problem being addressed significant enough to warrant a change to Swift?
  • Does this proposal fit well with the feel and direction of Swift?
  • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
  • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

More information about the Swift evolution process is available at:

Thank you,

-Chris
Review Manager


(Haravikk) #2

  • What is your evaluation of the proposal?

I’m in favour of this; it’s a simple change, but increases consistency between attributes and functions.

  • Is the problem being addressed significant enough to warrant a change to Swift?

While I’d say it’s a fairly minor change, the benefit to consistency is solid for what should be a simple change.

  • Does this proposal fit well with the feel and direction of Swift?

Yes. Consistency and clarity are pretty important to Swift.

  • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

Strangely quite a few languages have unique syntax for attributes, but I don’t feel that it’s been a benefit in any of them, so I’d prefer them to match regular code more closely in Swift.

  • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

Quick re-reading, but it’s a self-explanatory feature.

···

On 2 Mar 2016, at 22:46, Chris Lattner via swift-evolution <swift-evolution@swift.org> wrote:


(Brent Royal-Gordon) #3

https://github.com/apple/swift-evolution/blob/master/proposals/0040-attributecolons.md

  • What is your evaluation of the proposal?

In favor, but with the tiniest little hesitation.

Here's why: Last I heard, the plan was to apply behaviors with the attribute syntax. If we decide to allow you to pass parameters to behaviors, the syntax we use for that feature will surely be affected by this proposal:

  @json(key="id") var ID: Int
  @json(key: "id") var ID: Int

I *do* think that `:` is probably better than `=` for behaviors too, but before we leap, I recommend we take a few extra minutes to look at how this might interact with behaviors.

  • Is the problem being addressed significant enough to warrant a change to Swift?

It's a small inconsistency, but it also has a small solution. I think it's worth addressing.

  • Does this proposal fit well with the feel and direction of Swift?

I think it does, but see my comments above about behaviors.

  • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

In most languages I've worked with, attributes are an unholy mess, and sometimes appear to have been designed specifically to be as ungainly as possible. This is a marked improvement.

  • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

I was (as far as I know) the first to suggest the change on swift-evolution.

···

--
Brent Royal-Gordon
Architechies


(Patrick Gili) #4

  • What is your evaluation of the proposal?

I'm in favor of the change because it introduces more consistency to the language. I also like the proposal, because attribute arguments read like hash values now, which increases readability.

  • Is the problem being addressed significant enough to warrant a change to Swift?

Inconsistency always warrants change.

  • Does this proposal fit well with the feel and direction of Swift?

Yes.

  • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

Like Brent said, attributes in most other languages are an afterthought. Thus, drawing a comparison is difficult.

  • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

Quick read.

···

(David Hart) #5

  • What is your evaluation of the proposal?

The proposal makes sense and fixes one small inconsistency in the language.

  • Is the problem being addressed significant enough to warrant a change to Swift?

The problem is not significant, but the change is also not significant so I still think it’s worth it.

  • Does this proposal fit well with the feel and direction of Swift?

Yes, it fits with the continued goal of simplification and consistency.

  • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

C#’s attributes also use the syntax of function calls for parameters.

  • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

A detailed read as well as following the initial discussion.

···

On 02 Mar 2016, at 23:46, Chris Lattner via swift-evolution <swift-evolution@swift.org> wrote:


(Adrian Kashivskyy) #6

What is your evaluation of the proposal?

+1. Right now, attribute arguments are the only place in the grammar, where the equal sign is used apart of assignment.

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. Replacing equal sign with a colon would resemble argument label syntax and make the attributes syntax more natural and consistent with the language.

Pozdrawiam – Regards,
Adrian Kashivskyy

···

Wiadomość napisana przez Chris Lattner via swift-evolution <swift-evolution@swift.org> w dniu 02.03.2016, o godz. 23:46:

Hello Swift community,

The review of “Replacing Equal Signs with Colons For Attribute Arguments” begins now and runs through March 4, 2016. The proposal is available here:

https://github.com/apple/swift-evolution/blob/master/proposals/0040-attributecolons.md

Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at:
  https://lists.swift.org/mailman/listinfo/swift-evolution

or, if you would like to keep your feedback private, directly to the review manager. When replying, please try to keep the proposal link at the top of the message:

What goes into a review?

The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:

  • What is your evaluation of the proposal?
  • Is the problem being addressed significant enough to warrant a change to Swift?
  • Does this proposal fit well with the feel and direction of Swift?
  • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
  • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

More information about the Swift evolution process is available at:

https://github.com/apple/swift-evolution/blob/master/process.md

Thank you,

-Chris
Review Manager
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution


(William Dillon) #7

Another +1 for the same reasons.

+1. I completely agree with Haravikk's response.

   • What is your evaluation of the proposal?

I’m in favour of this; it’s a simple change, but increases consistency between attributes and functions.

   • Is the problem being addressed significant enough to warrant a change to Swift?

While I’d say it’s a fairly minor change, the benefit to consistency is solid for what should be a simple change.

   • Does this proposal fit well with the feel and direction of Swift?

Yes. Consistency and clarity are pretty important to Swift.

   • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

Strangely quite a few languages have unique syntax for attributes, but I don’t feel that it’s been a benefit in any of them, so I’d prefer them to match regular code more closely in Swift.

   • How much effort did you put into your review? A glance, a quick reading, or an in\-depth study?

Quick re-reading, but it’s a self-explanatory feature.

···

On March 2, 2016 at 6:34:48 PM, Trent Nadeau via swift-evolution (swift-evolution@swift.org) wrote:
On Wed, Mar 2, 2016 at 6:42 PM, Haravikk via swift-evolution <swift-evolution@swift.org> wrote:

On 2 Mar 2016, at 22:46, Chris Lattner via swift-evolution <swift-evolution@swift.org> wrote:

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

--
Trent Nadeau
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution


#8

I'm in favor of the proposal for the same reasons. One less special case to learn.

Stephen

···

On Mar 2, 2016, at 6:42 PM, Haravikk via swift-evolution <swift-evolution@swift.org> wrote:

On 2 Mar 2016, at 22:46, Chris Lattner via swift-evolution <swift-evolution@swift.org> wrote:

  • What is your evaluation of the proposal?

I’m in favour of this; it’s a simple change, but increases consistency between attributes and functions.

  • Is the problem being addressed significant enough to warrant a change to Swift?

While I’d say it’s a fairly minor change, the benefit to consistency is solid for what should be a simple change.

  • Does this proposal fit well with the feel and direction of Swift?

Yes. Consistency and clarity are pretty important to Swift.

  • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

Strangely quite a few languages have unique syntax for attributes, but I don’t feel that it’s been a benefit in any of them, so I’d prefer them to match regular code more closely in Swift.

  • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

Quick re-reading, but it’s a self-explanatory feature.
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution


(Trent Nadeau) #9

+1. I completely agree with Haravikk's response.

···

On Wed, Mar 2, 2016 at 6:42 PM, Haravikk via swift-evolution < swift-evolution@swift.org> wrote:

> On 2 Mar 2016, at 22:46, Chris Lattner via swift-evolution < > swift-evolution@swift.org> wrote:
>
> • What is your evaluation of the proposal?

I’m in favour of this; it’s a simple change, but increases consistency
between attributes and functions.

> • Is the problem being addressed significant enough to warrant a
change to Swift?

While I’d say it’s a fairly minor change, the benefit to consistency is
solid for what should be a simple change.

> • Does this proposal fit well with the feel and direction of Swift?

Yes. Consistency and clarity are pretty important to Swift.

> • If you have used other languages or libraries with a similar
feature, how do you feel that this proposal compares to those?

Strangely quite a few languages have unique syntax for attributes, but I
don’t feel that it’s been a benefit in any of them, so I’d prefer them to
match regular code more closely in Swift.

> • How much effort did you put into your review? A glance, a quick
reading, or an in-depth study?

Quick re-reading, but it’s a self-explanatory feature.
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

--
Trent Nadeau


(Thorsten Seitz) #10

+1 for the same reasons

-Thorsten

···

Am 03.03.2016 um 03:34 schrieb Trent Nadeau via swift-evolution <swift-evolution@swift.org>:

+1. I completely agree with Haravikk's response.

On Wed, Mar 2, 2016 at 6:42 PM, Haravikk via swift-evolution <swift-evolution@swift.org> wrote:

> On 2 Mar 2016, at 22:46, Chris Lattner via swift-evolution <swift-evolution@swift.org> wrote:
>
> • What is your evaluation of the proposal?

I’m in favour of this; it’s a simple change, but increases consistency between attributes and functions.

> • Is the problem being addressed significant enough to warrant a change to Swift?

While I’d say it’s a fairly minor change, the benefit to consistency is solid for what should be a simple change.

> • Does this proposal fit well with the feel and direction of Swift?

Yes. Consistency and clarity are pretty important to Swift.

> • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

Strangely quite a few languages have unique syntax for attributes, but I don’t feel that it’s been a benefit in any of them, so I’d prefer them to match regular code more closely in Swift.

> • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

Quick re-reading, but it’s a self-explanatory feature.
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

--
Trent Nadeau
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution


(Paul Ossenbruggen) #11

• What is your evaluation of the proposal?
+1 I see no real downside. Migrator should fix it.

• 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. inconsistency is undesirable.

• If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
N/A

• How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
grueling study for about 10 minutes


(Patrick Pijnappel) #12

+1
By the same logic

···

On Thu, Mar 3, 2016 at 1:39 PM, William Dillon via swift-evolution < swift-evolution@swift.org> wrote:

Another +1 for the same reasons.

On March 2, 2016 at 6:34:48 PM, Trent Nadeau via swift-evolution ( > swift-evolution@swift.org) wrote:

+1. I completely agree with Haravikk's response.

On Wed, Mar 2, 2016 at 6:42 PM, Haravikk via swift-evolution < > swift-evolution@swift.org> wrote:

> On 2 Mar 2016, at 22:46, Chris Lattner via swift-evolution < >> swift-evolution@swift.org> wrote:
>
> • What is your evaluation of the proposal?

I’m in favour of this; it’s a simple change, but increases consistency
between attributes and functions.

> • Is the problem being addressed significant enough to warrant a
change to Swift?

While I’d say it’s a fairly minor change, the benefit to consistency is
solid for what should be a simple change.

> • Does this proposal fit well with the feel and direction of
Swift?

Yes. Consistency and clarity are pretty important to Swift.

> • If you have used other languages or libraries with a similar
feature, how do you feel that this proposal compares to those?

Strangely quite a few languages have unique syntax for attributes, but I
don’t feel that it’s been a benefit in any of them, so I’d prefer them to
match regular code more closely in Swift.

> • How much effort did you put into your review? A glance, a quick
reading, or an in-depth study?

Quick re-reading, but it’s a self-explanatory feature.
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

--
Trent Nadeau
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution


(Howard Lovatt) #13

Another +1 following Haravikk's reasoning

···

On Thursday, 3 March 2016, Haravikk via swift-evolution < swift-evolution@swift.org> wrote:

> On 2 Mar 2016, at 22:46, Chris Lattner via swift-evolution < > swift-evolution@swift.org <javascript:;>> wrote:
>
> • What is your evaluation of the proposal?

I’m in favour of this; it’s a simple change, but increases consistency
between attributes and functions.

> • Is the problem being addressed significant enough to warrant a
change to Swift?

While I’d say it’s a fairly minor change, the benefit to consistency is
solid for what should be a simple change.

> • Does this proposal fit well with the feel and direction of Swift?

Yes. Consistency and clarity are pretty important to Swift.

> • If you have used other languages or libraries with a similar
feature, how do you feel that this proposal compares to those?

Strangely quite a few languages have unique syntax for attributes, but I
don’t feel that it’s been a benefit in any of them, so I’d prefer them to
match regular code more closely in Swift.

> • How much effort did you put into your review? A glance, a quick
reading, or an in-depth study?

Quick re-reading, but it’s a self-explanatory feature.
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org <javascript:;>
https://lists.swift.org/mailman/listinfo/swift-evolution

--
-- Howard.


(Alex Hoppen) #14

Another +1 from me

- Alex

···

On 03 Mar 2016, at 00:42, Haravikk via swift-evolution <swift-evolution@swift.org> wrote:

On 2 Mar 2016, at 22:46, Chris Lattner via swift-evolution <swift-evolution@swift.org> wrote:

   • What is your evaluation of the proposal?

I’m in favour of this; it’s a simple change, but increases consistency between attributes and functions.

   • Is the problem being addressed significant enough to warrant a change to Swift?

While I’d say it’s a fairly minor change, the benefit to consistency is solid for what should be a simple change.

   • Does this proposal fit well with the feel and direction of Swift?

Yes. Consistency and clarity are pretty important to Swift.

   • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

Strangely quite a few languages have unique syntax for attributes, but I don’t feel that it’s been a benefit in any of them, so I’d prefer them to match regular code more closely in Swift.

   • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

Quick re-reading, but it’s a self-explanatory feature.
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution


(Jacob Bandes-Storch) #15

+1. Quick read.

···

On Wed, Mar 2, 2016 at 7:13 PM Patrick Pijnappel via swift-evolution < swift-evolution@swift.org> wrote:

+1
By the same logic

On Thu, Mar 3, 2016 at 1:39 PM, William Dillon via swift-evolution < > swift-evolution@swift.org> wrote:

Another +1 for the same reasons.

On March 2, 2016 at 6:34:48 PM, Trent Nadeau via swift-evolution ( >> swift-evolution@swift.org) wrote:

+1. I completely agree with Haravikk's response.

On Wed, Mar 2, 2016 at 6:42 PM, Haravikk via swift-evolution < >> swift-evolution@swift.org> wrote:

> On 2 Mar 2016, at 22:46, Chris Lattner via swift-evolution < >>> swift-evolution@swift.org> wrote:
>
> • What is your evaluation of the proposal?

I’m in favour of this; it’s a simple change, but increases consistency
between attributes and functions.

> • Is the problem being addressed significant enough to warrant a
change to Swift?

While I’d say it’s a fairly minor change, the benefit to consistency is
solid for what should be a simple change.

> • Does this proposal fit well with the feel and direction of
Swift?

Yes. Consistency and clarity are pretty important to Swift.

> • If you have used other languages or libraries with a similar
feature, how do you feel that this proposal compares to those?

Strangely quite a few languages have unique syntax for attributes, but I
don’t feel that it’s been a benefit in any of them, so I’d prefer them to
match regular code more closely in Swift.

> • How much effort did you put into your review? A glance, a
quick reading, or an in-depth study?

Quick re-reading, but it’s a self-explanatory feature.
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

--
Trent Nadeau
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution


(Rudolf Adamkovič) #16

+1 here too!

R+

···

Sent from my iPhone

On 03 Mar 2016, at 06:48, Thorsten Seitz via swift-evolution <swift-evolution@swift.org> wrote:

+1 for the same reasons

-Thorsten

Am 03.03.2016 um 03:34 schrieb Trent Nadeau via swift-evolution <swift-evolution@swift.org>:

+1. I completely agree with Haravikk's response.

On Wed, Mar 2, 2016 at 6:42 PM, Haravikk via swift-evolution <swift-evolution@swift.org> wrote:

> On 2 Mar 2016, at 22:46, Chris Lattner via swift-evolution <swift-evolution@swift.org> wrote:
>
> • What is your evaluation of the proposal?

I’m in favour of this; it’s a simple change, but increases consistency between attributes and functions.

> • Is the problem being addressed significant enough to warrant a change to Swift?

While I’d say it’s a fairly minor change, the benefit to consistency is solid for what should be a simple change.

> • Does this proposal fit well with the feel and direction of Swift?

Yes. Consistency and clarity are pretty important to Swift.

> • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

Strangely quite a few languages have unique syntax for attributes, but I don’t feel that it’s been a benefit in any of them, so I’d prefer them to match regular code more closely in Swift.

> • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

Quick re-reading, but it’s a self-explanatory feature.
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

--
Trent Nadeau
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution