October 07, 2015
On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:
> I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges:
>
> Generative - iota, recurrence, sequence
> Compositional - chain, roundRobin, transposed
> Iterative - retro, stride, lockstep
> XXX - take, drop
>
> What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.

Mutating.
October 07, 2015
On Wednesday, 7 October 2015 at 16:54:00 UTC, Meta wrote:
> On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:
>> I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges:
>>
>> Generative - iota, recurrence, sequence
>> Compositional - chain, roundRobin, transposed
>> Iterative - retro, stride, lockstep
>> XXX - take, drop
>>
>> What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.
>
> Mutating.

Except that take doesn't mutate its function argument, and drop only does if the range is a reference type. So, they really aren't mutating algorithms.

- Jonathan M Davis
October 07, 2015
On Wed, Oct 07, 2015 at 05:15:45PM +0000, Jonathan M Davis via Digitalmars-d wrote:
> On Wednesday, 7 October 2015 at 16:54:00 UTC, Meta wrote:
> >On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:
> >>I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges:
> >>
> >>Generative - iota, recurrence, sequence
> >>Compositional - chain, roundRobin, transposed
> >>Iterative - retro, stride, lockstep
> >>XXX - take, drop
> >>
> >>What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.
> >
> >Mutating.
> 
> Except that take doesn't mutate its function argument, and drop only does if the range is a reference type. So, they really aren't mutating algorithms.
[...]

Sub-ranging?


T

-- 
A program should be written to model the concepts of the task it performs rather than the physical world or a process because this maximizes the potential for it to be applied to tasks that are conceptually similar and, more important, to tasks that have not yet been conceived. -- Michael B. Allen
October 07, 2015
On 10/07/2015 09:15 AM, Mike Parker wrote:
> On Wednesday, 7 October 2015 at 15:43:44 UTC, Ali Çehreli wrote:
>>
>> Something like shortening, minimizing?
>>
>> Ali
>
> How about reductive?
>

That's what I had in mind when I started thesaurusing for the other two. :)

Ali

October 07, 2015
On Wednesday, 7 October 2015 at 17:15:47 UTC, Jonathan M Davis wrote:
> Except that take doesn't mutate its function argument, and drop only does if the range is a reference type. So, they really aren't mutating algorithms.
>
> - Jonathan M Davis

Yeah, true. Partitioning or Isolating, something along those lines seems more descriptive I guess, as that's technically what you're doing.
October 07, 2015
On Wednesday, 7 October 2015 at 18:09:51 UTC, Meta wrote:
> On Wednesday, 7 October 2015 at 17:15:47 UTC, Jonathan M Davis wrote:
>> Except that take doesn't mutate its function argument, and drop only does if the range is a reference type. So, they really aren't mutating algorithms.
>>
>> - Jonathan M Davis
>
> Yeah, true. Partitioning or Isolating, something along those lines seems more descriptive I guess, as that's technically what you're doing.

Needy
October 07, 2015
On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:
> I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges:
>
> Generative - iota, recurrence, sequence
> Compositional - chain, roundRobin, transposed
> Iterative - retro, stride, lockstep
> XXX - take, drop
>
> What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.

If it were just take, then maybe "bounding" would work, and I guess that _technically_ that works with drop as well, but it seems kind of off to talk about bounding when the bounds are everything _but_ a small number of elements.

- Jonathan M Davis
October 07, 2015
On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:
> I'm looking for ideas on how to label the ranges returned from take and drop. Some examples of what I think are appropriate categories for other types of ranges:
>
> Generative - iota, recurrence, sequence
> Compositional - chain, roundRobin, transposed
> Iterative - retro, stride, lockstep
> XXX - take, drop
>
> What to put into the XXX? I first thought of "Greedy", but that has an association with "greedy algorithms" that I don't really like. That led to "Selfish", but it's admittedly not that appropriate. Beyond that, I'm stuck. Any and all ideas appreciated.

Selective

Although, then stride fits better into Selective than into Iterative. On the other hand, iterative seems not that fitting to me. lockstep might also be Compositional.
October 08, 2015
On Wednesday, 7 October 2015 at 15:06:55 UTC, Mike Parker wrote:
>
> What to put into the XXX?

Thanks for the brainstorming session everyone. I'm on a deadline so I need to pick something and go with it. This thread has simplified things for me.
October 08, 2015
On Wednesday, 7 October 2015 at 18:26:29 UTC, qznc wrote:
>
> Selective
>
> Although, then stride fits better into Selective than into Iterative. On the other hand, iterative seems not that fitting to me. lockstep might also be Compositional.

I actually agree with you about iterative, but I hadn't considered changing it until I read this. IIRC, I picked the name based on the documentation. All three of the listed ranges use "Iterates" in the short description. I also included zip in that category because it's akin to lockstep, despite the intuition that it should be considered compositional.

Anyway, I'm not looking to establish any conventions here, just an easy way to describe ranges. This thread has helped a good deal.