[swift-evolution] Proposal to remove semicolons
Mosab Elagha
mosabelagha at gmail.com
Tue Dec 15 03:58:17 CST 2015
>> In that case why did you accept to remove for loop c style and ++/--
operators? It is the same reasoning.
Although I wish ++/-- were still with us, those are arbitrary indicators
for += 1, so removing them would make code more clear in its intention.
Having a semicolon at the end of a line in Swift does not make any
difference in code clarity - in fact I know many who prefer to put the
semicolon, as they would like a surefire way to see the end of a
statement/line of code when working or reviewing code. It's purely a matter
of preference and removing it would give no benefit.
-1
-Mosab Elagha
On Tue, Dec 15, 2015 at 2:11 AM, João Nunes <swift-evolution at swift.org>
wrote:
> In that case why did you accept to remove for loop c style and ++/--
> operators? It is the same reasoning.
>
> Joao
>
> Sent from my iPhone
>
> On 15 Dec 2015, at 06:56, Chris Lattner <clattner at apple.com> wrote:
>
>
> On Dec 14, 2015, at 3:44 PM, Douglas Gregor <dgregor at apple.com> wrote:
>
>
> On Dec 14, 2015, at 11:01 AM, Chris Lattner via swift-evolution <
> swift-evolution at swift.org> wrote:
>
> There are two different topics here, and I’d suggest exploring them
> separately.
>
> - The semicolon within a line is a expressivity feature.
> - The semicolon at the end of the line is accepted, but generally ignored.
>
> Most people seem to be focusing on the second one. IMO, I think that it
> adds value to the language for people coming from semi-colon oriented
> languages or bouncing between multiple languages (that muscle memory takes
> awhile to break). OTOH, it is just syntactic noise (along with redundant
> parens in conditions and many other things), and so having a warning
> (probably opt-in) for it would make sense to me.
>
>
> This seems firmly in linter/style warning territory. Unlike with other
> features that are being removed in Swift 3.0, optional semicolons at the
> end of are utterly harmless: nobody is going to have to reason about them
> beyond “oh, I can ignore that.
>
>
> I agree. I am missing the motivation for what harm they are causing.
>
> -Chris
>
>
> _______________________________________________
> 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/20151215/4faffd17/attachment.html>
More information about the swift-evolution
mailing list