C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] dofor loop
From: Thiago Macieira (thiago_at_[hidden])
Date: 2019-12-27 08:49:42


On Friday, 27 December 2019 08:31:40 -03 Михаил Найденов via Std-Proposals
wrote:
> Note that raw loops are out of fashion right now. Also, there are arguably
> too many iteration statements already, considering all can be expressed
> with one or two of the existing ones.
> Can you give some compelling examples.

And by compelling, please make them REALLY compelling. They should be
something that is MUCH clearer than any existing method of doing the same.

Your example of printing the indices of an array is contrived and trivial. It
shows no useful work and can be implemented in a dozen different ways.
Besides, all it really shows is that the containers should have used signed
integers for indices, not unsigned.

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.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel System Software Products

STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups