[swift-evolution] Brace syntax
Paul Ossenbruggen
possen at gmail.com
Sun Dec 20 20:53:09 CST 2015
I agree, there is no need to change this. Braces are fine. Even if they are recommended at the end of the line, prior to Swift I was a firm believer in the one-true-brace style (i.e. aligned) but I prefer to have the defacto standard present in Swift. It turns out it is fine and does not bother me now that I am used to it. Was initially maybe wishing it was no braces? Yes, but I think it was the right decision in the end. If we change it, some people will be annoyed that it changed other will will be happy, I doubt there can can be any agreement to change it.
One advantage of being on the core team that designed the language prior to open sourcing it, is that you get to make decisions like this. I am sure they were quite aware of Python and every other language out there and decided to go with this approach.
This may sound a bit ironic coming from a guy who wants to replace ternary, and it is not a bad thing to revisit things if they are truly going to make things better but I think what I am suggesting actually could be more powerful and useful. Changing the brace style does not improve anything it except level of clutter, after that, it is more of personal preference.
Further, I used to be in firmly in the tab camp but now, I find I don’t care and actually prefer spaces.
- Paul
> On Dec 20, 2015, at 1:34 PM, Douglas Gregor via swift-evolution <swift-evolution at swift.org> wrote:
>
> You're right that this has been requested elsewhere; it's currently on me to get some basic structure for a "commonly requested changes" page into the swift-evolution repo so we can track such things.
>
> Sent from my iPhone
>
>> On Dec 20, 2015, at 12:45 PM, Austin Zheng via swift-evolution <swift-evolution at swift.org> wrote:
>>
>> It's been mentioned in a few other threads, but it would be nice to have a FAQ somewhere listing common things that people are likely to ask for, and what sort of burden of proof they should bring to the table if they want to make a proposal about those things.
>>
>> This would prevent us from having perennially recurring (and increasingly useless) discussions, while also leaving the door open for people who really do have groundbreaking new arguments for e.g. whitespace vs braces.
>>
>> Austin
>>
>>>> On Dec 20, 2015, at 12:37 PM, Andrey Tarantsov via swift-evolution <swift-evolution at swift.org> wrote:
>>>>
>>>> How can we find out if the core team is willing to consider this?
>>>
>>> Well, for example:
>>>
>>>> I do agree that there are some benefits to ditching braces and relying on indentation instead, but there are also downsides. Deviating from the C family in this respect would have to provide *overwhelmingly* large advantages for us to take such a plunge, and they simply don’t exist.
>>>>
>>>> -Chris
>>>
>>> A.
>>>
>>> _______________________________________________
>>> swift-evolution mailing list
>>> swift-evolution at swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-evolution
>>
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
More information about the swift-evolution
mailing list