Re: Ranges seem awkward to work with

2017-09-12 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 12, 2017 13:47:47 Azi Hassan via Digitalmars-d-learn wrote: > On Tuesday, 12 September 2017 at 01:13:29 UTC, Hasen Judy wrote: > > Now, a lot of library functions seem to expect ranges as inputs > > and return ranges as output. > > Unless I'm mistaken, it was done on purpose

Re: Ranges seem awkward to work with

2017-09-12 Thread Azi Hassan via Digitalmars-d-learn
On Tuesday, 12 September 2017 at 01:13:29 UTC, Hasen Judy wrote: Now, a lot of library functions seem to expect ranges as inputs and return ranges as output. Unless I'm mistaken, it was done on purpose to reduce the amount of memory allocations in the standard library so that it becomes

Re: Ranges seem awkward to work with

2017-09-11 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 12 September 2017 at 01:13:29 UTC, Hasen Judy wrote: Is this is a common beginner issue? I remember using an earlier version of D some long time ago and I don't remember seeing this concept. Now, a lot of library functions seem to expect ranges as inputs and return ranges as

Re: Ranges seem awkward to work with

2017-09-11 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 12 September 2017 at 01:13:29 UTC, Hasen Judy wrote: Is this is a common beginner issue? I remember using an earlier version of D some long time ago and I don't remember seeing this concept. D's ranges can take getting used to, so if you haven't already, these two articles are

Re: Ranges seem awkward to work with

2017-09-11 Thread Jesse Phillips via Digitalmars-d-learn
On Tuesday, 12 September 2017 at 01:18:21 UTC, Nicholas Wilson wrote: On Tuesday, 12 September 2017 at 01:13:29 UTC, Hasen Judy wrote: Is this is a common beginner issue? if `range.save` works use that, otherwise std.csv does not, IIRC. `range.dup` will duplicate the range That isn't a

Re: Ranges seem awkward to work with

2017-09-11 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 12 September 2017 at 01:13:29 UTC, Hasen Judy wrote: Is this is a common beginner issue? I remember using an earlier version of D some long time ago and I don't remember seeing this concept. Now, a lot of library functions seem to expect ranges as inputs and return ranges as

Ranges seem awkward to work with

2017-09-11 Thread Hasen Judy via Digitalmars-d-learn
Is this is a common beginner issue? I remember using an earlier version of D some long time ago and I don't remember seeing this concept. Now, a lot of library functions seem to expect ranges as inputs and return ranges as output. Even parsing a csv line returns a range. And the funny thing