If `do` were to get an optional init-statement and `while` an optional
increment-statement then you could have:

  do [ (init-statement) ]
  {
    ...statements...
  } while (condition [ ; increment-statement ] )

/john

On Fri, Dec 27, 2019 at 11:39 AM Matthew Woehlke via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
On 27/12/2019 09.49, Thiago Macieira via Std-Proposals wrote:
> Note: you're unlikely to get "dofor" as a keyword. Please investigate a new
> syntax that does not involve a new keyword and does not break existing code.

Well, *that* much is easy. If I understand what Menashe is asking for:

  do (init-statement)
  {
    ...statements...
  } for (condition; increment-statement)

...but is it worth it? I just don't know.

(OTOH, I wouldn't mind `do` having an optional init-statement...)

...although that's very close to being an SC break, and I can already
hear compiler vendors complaining about the necessary look-ahead :'(.

--
Matthew
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals


--
John Yates
505 Tremont St, #803
Boston, MA 02116