Bartosz Milewski seems to like D more than C++ now :)

Szymon Gatner noemail at gmail.com
Fri Sep 20 04:01:23 PDT 2013


On Friday, 20 September 2013 at 10:47:52 UTC, Dmitry Olshansky 
wrote:
> 20-Sep-2013 14:00, Jacob Carlborg пишет:
>> On 2013-09-20 11:37, Szymon Gatner wrote:
>>
>>> If only std algorithms took containers (by that I mean things 
>>> that
>>> container for accepts too) as arguments (and not 
>>> iterators)... even in
>>> the form of new functions like foreach_all, transform_all etc.
>>
>> Can't a container be a range as well?
>>
>
> For Christ sake no, no and no. For starters range skips/drops 
> elements when iterating, and thusly iteration has its own state 
> that is useless for a container otherwise.
>

Iteration is a stateful process, ranges are related to the 
process of iteration not to containers. As you say state is 
useless for containers but is necessary to iteration and its 
context.



More information about the Digitalmars-d mailing list