popFrontExactly?

monarch_dodra monarchdodra at gmail.com
Mon Nov 26 05:05:48 PST 2012


On Friday, 23 November 2012 at 21:18:57 UTC, Jonathan M Davis 
wrote:
> Still, if we can't do that, and we're trying to minimize the 
> number of stray
> functions in std.range, then we could just create 
> drop(Front)Exactly and
> dropBackExactly and let people do
>
> range = dropExactly(range, 5);
>
> if they want popFrontExactly.
>
> - Jonathan M Davis

Well, if the goal was reducing the amount of functions, or 
avoiding hard to grasp variants, then I'd agree.

But in this case, the goal (IMO) is to provide convenient and 
intuitive tools for coding.

I think (but this is my point of view), that while there are 
several different names and variants, it all remains in a simple 
and comprehensive package. The function names alone are enough to 
know what it does, and it's not like there are any "traps", or 
things where you'd need to read documentation 10 minutes to 
understand *why* there are different functions.

I don't see it as a problem to have all these functions, but 
that's my point of view.


More information about the Digitalmars-d mailing list