[Issue 8085] std.algorithm.joiner makes invalid assumptions about front()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 6 13:01:36 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8085


jens.k.mueller at gmx.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jens.k.mueller at gmx.de


--- Comment #1 from jens.k.mueller at gmx.de 2012-07-06 13:01:33 PDT ---
I'm thinking about fixing this issue but there are several approaches:

1. Fix joiner (BTW why name it joiner and not just join; same for splitter; Is
this because there used to be a string.split or and std.path.join?)

2. Fix ByLine to not invalidate front when doing a popFront
Is it common in Phobos for a range to invalidate front? ByLine and probably
also ByChunk (haven't checked) are the only ranges that invalidate front,
aren't they. There is also ByRecord which does not show up in the
documentation.

3. If it is a common scheme to invalidate front then one could implement an
adapter to store a copy of front even though that is less efficient.

I prefer option 2 because it can be implemented with little space overhead but
you seem to prefer option 1 which suggests that a range *usually* invalidates
front.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list