30-Dec-2013 09:29, Marco Leise пишет:
Am Sun, 29 Dec 2013 22:45:35 +0000
schrieb "Vladimir Panteleev" <[email protected]>:
[snip]
2. I don't understand the rationale behind the current semantics
of lookahead/lookbehind. If you want to e.g. peek ahead/behind to
find the first whitespace char, you don't know how many chars to
request. Wouldn't it be better to make these functions return the
ENTIRE available buffer in O(1)?
Yeah, been there too. I guess after X years of programming
chances are good you implemented some buffer with
look-ahead. :)
I use those primitives:
ubyte[] mapAvailable() pure nothrow
ubyte[] mapAtLeast(in ℕ count)
Yeah, that's a good idea.
I mean primitives, not Unicode in type names ;)
--
Dmitry Olshansky