Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2005-02-03 20:35:29


Thorsten Ottosen writes:
> | > So you don't think the iterator capabilities is worth the trouble?
> |
> | They are just one possible workaround for the lack of 'foreach',
> | hardly commonplace and arguably unidiomatic, and as such are at best
> | of a subjective utility. Something like that might be offered by some
> | other library that targets to compensate this language shortcoming,
> | but they certainly don't belong to 'iterator_range'. Straightforward
> | and uncontroversial is IMO what we should target for here.
> |
> | >
> | > | and the
> | > | rest is at best a questionable "convenience" baggage with no value for
> | > | generic code. Also, think "standardization".
> | >
> | > Do you mean make_sub_range() and the others?
> |
> | I meant iteration shortcuts (advance, ++ and *).
>
> in some sence operator*() is provided by operator[]()... I guess
> random access iterators will fit must use cases like strings. But
> OTOH, I don't see how two functions (let's scrap advance) can hurt
> at all, not even in a standardization context.

To put it bluntly, my point is that they are somebody's pet features
(not necessarily yours, mind you), as opposite to functionality to
support widely accepted, idiomatic usage. 'iterator_range' is too
important to let it get greased with pet features.

-- 
Aleksey Gurtovoy
MetaCommunications Engineering

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk