[swift-evolution] Proposal to remove semicolons

Erica Sadun erica at ericasadun.com
Mon Dec 14 16:34:44 CST 2015


I would be against removing semi-colons. 

Semicolons can be used poorly, for example, terminating lines due to C-style coding habits. Semicolons can be used well, for example, grouping related tasks together, such as combining alloc with its defer{free} counterpart.  The former can be caught with de-linting. The latter offers a valuable tool.

Poor style we will always have. Removing single-line statement grouping offers no measurable gain at a real cost.

--  Erica


> On Dec 14, 2015, at 2:21 PM, Charles Constant via swift-evolution <swift-evolution at swift.org> wrote:
> 
> > semicolon within a line is a expressivity feature.
> 
> I don't care if they're invalid as a terminator for lines with *single* statements. It would feel annoyingly restrictive to program in a language where you can never use two statements on the same line. Even Python allows that!  
> 
> 
> 
> On Mon, Dec 14, 2015 at 12:57 PM, Sune Foldager via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> 
>> From: Chris Lattner <clattner at apple.com <mailto:clattner at apple.com>>
>> Subject: Re: [swift-evolution] Proposal to remove semicolons
>> Date: 14 December 2015 at 20:01:00 GMT+1
>> To: Colin Cornaby <colin.cornaby at mac.com <mailto:colin.cornaby at mac.com>>
>> Cc: swift-evolution at swift.org <mailto:swift-evolution at swift.org>, joao3001 at hotmail.com <mailto:joao3001 at hotmail.com>
>> 
>> There are two different topics here, and I’d suggest exploring them separately.
>> 
>> - The semicolon within a line is a expressivity feature.
> 
> Yes, and it’s also useful for shell one-liners like "swift <(echo ‘some; swift; statements’)” (is there an option I’m missing to avoid the shell trick?). I am against removing them.
> 
> -Sune
> 
> 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-evolution <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

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


More information about the swift-evolution mailing list