View mode: basic / threaded / horizontal-split · Log in · Help
November 24, 2012
Re: popFrontExactly?
On Saturday, November 24, 2012 07:43:26 Mehrdad wrote:
> I wouldn't mind also adding a popFrontApproximately()
> 
> =P

So, what's it do? Randomly pick a number close to the number that you give it 
and try to pop that many? :)

- Jonathan M Davis
November 24, 2012
Re: popFrontExactly?
On Saturday, 24 November 2012 at 06:50:43 UTC, Jonathan M Davis 
wrote:
> On Saturday, November 24, 2012 07:43:26 Mehrdad wrote:
>> I wouldn't mind also adding a popFrontApproximately()
>> 
>> =P
>
> So, what's it do? Randomly pick a number close to the number 
> that you give it and try to pop that many? :)
>
> - Jonathan M Davis


That's an implementation detail.
November 26, 2012
Re: popFrontExactly?
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.
Next ›   Last »
1 2
Top | Discussion index | About this forum | D home