RFC on range design for D2
Bill Baxter
wbaxter at gmail.com
Wed Sep 10 06:43:36 PDT 2008
On Wed, Sep 10, 2008 at 10:07 PM, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> Bill Baxter wrote:
>>
>> But I think you and I are in agreement that it would be easier and
>> more natural to think of ranges as iterators augmented with
>> information about bounds, as opposed to a contiguous block of things
>> from A to B.
>
> I like that you are bringing this point up, it is interesting. Note that my
> API never assumes or requires that there's an actual contiguous block of
> things underneath. Au contraire, in the I/O case, there's only "the current
> element" underneath.
Yes, I see that and think it's great. But the point I've been trying
to make is that the nomenclature you are using seems to emphasize the
contiguous block interpretation, rather than the interpretation as a
cursor plus a sentinel. The contiguous block terminology makes good
sense for slices, but less for things like trees and unbounded
generators and HMMs.
And ok, I do think your incredible shrinking bidirectional range is
borked. But other than that, I'm just talking about terminology.
Did you read my posts over on DigtialMars.D? I'm not into the
"massive thread on d.announce" thing -- makes it too hard to find
sub-threads later -- so I started some new sub-threads over there.
--bb
More information about the Digitalmars-d-announce
mailing list