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

From: Std-Discussion <std-discussion-bounces@lists.isocpp.org> on behalf of William Linkmeyer via Std-Discussion <std-discussion@lists.isocpp.org>
Sent: Thursday, April 28, 2022 10:11:36 AM
To: Std-Discussion@lists.isocpp.org <Std-Discussion@lists.isocpp.org>
Cc: William Linkmeyer <wlink10@gmail.com>
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@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion