[swift-evolution] Brace syntax

Valentin Radu radu.v.valentin at me.com
Sun Dec 20 08:01:30 CST 2015


I admit this is 100% a personal preference and that dropping the braces would not significantly affect me, but I got used to them and instinctually search code blocks using them. I prefer reading like that, even if that means writing more code. If you think about it, writing code is maybe 20% of the time you spend on an app.
-1

> On Sun 20 Dec, 15, at 14:25, Charles Constant via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Yes, that is the point. If you use braces in Swift, you will naturally gravitate to all sorts of personalized strategies. Now this is possible with significant whitespace (e.g.: Python uses the semicolon to put multiple statements on the same line) but not nearly as common.
> 
> 
> On Sun, Dec 20, 2015 at 4:22 AM, Tino Heth <2th at gmx.de <mailto:2th at gmx.de>> wrote:
> 
>> var foo: Int 
>> {
>>     get 
>>     { 
>>         return _foo
>>     }
>>     set 
>>     {
>>         _foo = newValue
>>     }
>> }
>> 
> I assume you know that braces don't require an extra line for themselves? ;-)
> 
>  _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151220/c82c0383/attachment.html>


More information about the swift-evolution mailing list