C++ Logo

std-proposals

Advanced search

Re: [std-proposals] 1liner ideas for proposals

From: Alejandro Colomar <une+cxx_std-proposals_at_[hidden]>
Date: Sat, 28 Feb 2026 16:51:33 +0100
Hi Bo,

On 2026-02-28T11:55:23+0100, Bo Persson via Std-Proposals wrote:
> There is a problem in using context sensitive keywords, when that keyword is
> used to establish the context! It works for 'override' because that is used
> in a place (far at the end of a context) where nothing else is allowed.
>
> Otherwise there will be problems with things like a potential
>
> mut auto x = 1;
>
> where 'mut' can already be a concept.
>
> Also, the more "special identifiers" (non-keywords) we add, the more
> difficult it will be to parse the code. We have already seen code with no
> keywords at all in PL/I. That allows for scary things like
>
> if if = then then then = else else else = if;
>
> The first 'if' starts a conditional statement, the second 'if' is a user
> defined variable. We surely don't that to happen in C++.

We already have a little bit of that. :)

 #include <stddef.h>
 int
 main(void)
 {
  size_t size_t;
  size_t = 1;
  return size_t;
 }


Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es>

Received on 2026-02-28 15:51:48