C++ Logo

std-discussion

Advanced search

Re: Optional Semicolons

From: Marios Staikopoulos <marios_at_[hidden]>
Date: Thu, 28 Apr 2022 17:23:50 +0000
Sorry, I just don't see this working. It would break constantly as there would be so many exceptions, and there are tons of cases where statements are broken up into multiple newlines on purpose.

The easiest example is a reference returning declarative syntax, where it is quite common to break it into groups.


IE:
node.AddElement()

    .SetBackgroundColor()
    .SetOpacity()

    .SetFont()
    .SetFontSize();

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: Std-Discussion <std-discussion-bounces_at_[hidden]> on behalf of William Linkmeyer via Std-Discussion <std-discussion_at_[hidden]>
Sent: Thursday, April 28, 2022 10:11:36 AM
To: Std-Discussion_at_[hidden] <Std-Discussion_at_[hidden]>
Cc: William Linkmeyer <wlink10_at_[hidden]>
Subject: [std-discussion] Optional Semicolons

Hello,

I’ve been considering writing a paper which allows the programmer to elide semicolons when the statement is otherwise followed by any number of whitespace and a newline.

This would *only* apply to statements — function and class declarations and prototypes would be left untouched.

I am wondering if this has come up before, and, if so, what the reception was like. If there is no interest for this, I’d rather not write the paper or mess with libclang to see if a quick implementation is possible.

Happily,
Will Linkmeyer
--
Std-Discussion mailing list
Std-Discussion_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion

Received on 2022-04-28 17:23:54