Date: Thu, 28 Apr 2022 13:26:30 -0400
On 28/04/2022 13.11, William Linkmeyer via Std-Discussion wrote:
> 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.
Hmm. So this (potentially¹ perfectly legal code):
int x = 5
*y = 7;
...will suddenly mean something completely different? Seems like a
non-starter.
(¹ Okay, I needed an `int& operator*(int, decltype(y))`, but I doubt
this is the only pathological example in existence.
> 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.
Hmm. So this (potentially¹ perfectly legal code):
int x = 5
*y = 7;
...will suddenly mean something completely different? Seems like a
non-starter.
(¹ Okay, I needed an `int& operator*(int, decltype(y))`, but I doubt
this is the only pathological example in existence.
-- Matthew
Received on 2022-04-28 17:26:33