C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] grammar cleanup

From: Uecker, Martin <Martin.Uecker_at_[hidden]>
Date: Wed, 28 Apr 2021 07:52:41 +0000


Am Dienstag, den 27.04.2021, 09:43 +0200 schrieb Jens Gustedt via
Liaison:
> Hello,
> perhaps we can get on track for a more technical discussion, for
> which
> I think that this reflector and the study group were created. There
> are excellent forums out there where people heatedly debate
> advantages
> of their favorite programming languages.

This was not primarly a discussion about the advantages of each
programming language but about native arrays which are part of both
languages. It is also highly relevant to this study group
which approach C++ takes here. If C++ decides to treat
these as a legacy concept only it will be difficult to
maintain compatibility in this area.

...
>
> Another field of concern could be selection and iteration statements
> where C++ has expanded the grammar by adding the possibility of
> declaring variables, similar as to `for`. I personally like that
> feature very much, but I wouldn't know if WG14 is ready for it, yet.

I would also like such a feature and it seems simple and
unproblematic.

> In any case it would be good to know if these changes in C++ have
> introduced other changes in the grammar for these constructs, similar
> to what we have seen for the subscript operator.
>
> I personally would find it a good thing if we could change all
> controlling expressions of selection and iteration statements to
> "conditional-expression". Yes, this would be change that would
> invalidate some existing code, but in a good way ;-) Using a comma
> operator or assignment then would be a hard error and it would be
> easy for programmers to update their code.

I agree, we should think about deprecating these.

Best,
Martin

>
> Jā‚‘ā‚™ā‚›
>
> _______________________________________________
> Liaison mailing list
> Liaison_at_[hidden]
> Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/liaison
> Link to this post: http://lists.isocpp.org/liaison/2021/04/0506.php

Received on 2021-04-28 02:52:50