Boost logo

Boost :

Subject: Re: [boost] [iterator] generator_iterator vs. function_input_iterator
From: Robert Ramey (ramey_at_[hidden])
Date: 2017-08-31 18:18:01

On 8/31/17 9:16 AM, Michel Morin via Boost wrote:
> Andrey Semashev wrote:
>> There seems to be two nearly equivalent components in Boost.Iterator:
>> generator_iterator (moved from Boost.Utility) and function_input_iterator.
> `function_input_iterator`'s implementation looks better than that of
> `generator_iterator`. However, the name of the former is not appealing.
> "generate" is a standard word to Range enthusiasts -- it is used like
> `generate(non_pure_func) | take(10)`.
> Thus, I would like to deprecate `generator_iterator` first and then rename
> `function_input_iterator` to `generator_iterator`.

Hmmmm - I'm thinking that silently changing the functionality of a
component 12? years old to something "nearly" equivalent is a really bad
idea. How can one know that this wouldn't break old code in a way
that's just about impossible to track down.

If you wanted to create a "better" naming scheme and map them to the
original names with typedef or using, that would be much better and have
no potential for inflicting damage on innocent bystanders, that would be
OK. But then you'd have to update the documentation which is another
task. Actually, I question the value in this kind of change anyway.
There's nothing which would prevent users who are annoyed by this from
just including a couple of typedefs/usings in their own code. This
looks like cosmetic surgery where the quest for perfection is the enemy
of getting the best result.

Robert Ramey

> Regards,
> Michel
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at