C++ Logo

std-discussion

Advanced search

Re: Optional Semicolons

From: William Linkmeyer <wlink10_at_[hidden]>
Date: Thu, 28 Apr 2022 14:41:40 -0400
Ok, you got me. I’m an agent from ioccc.

Seriously, though — there do appear to be more downsides to this than I initially realized.

The #include behavior may actually break existing code, which is a non-starter.

I also did not realize that + was a unary operator, meaning that one of the given examples would not work.

WL

> On Apr 28, 2022, at 2:36 PM, Richard Hodges via Std-Discussion <std-discussion_at_[hidden]> wrote:
>
> 
>
>
>> On Thu, 28 Apr 2022 at 19:11, William Linkmeyer via Std-Discussion <std-discussion_at_[hidden]> 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 will make ioccc entries even more cryptic.
> Plus auto code formatters will be breaking code all over the place.
>
>>
>> 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
> --
> Richard Hodges
> hodges.r_at_[hidden]
> office: +44 2032 898 513
> home: +376 861 195
> mobile: +376 380 212
>
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion

Received on 2022-04-28 18:41:41