<div class="gmail_quote">On Wed, Oct 27, 2010 at 2:20 AM, Masahiro Nakagawa <span dir="ltr"><<a href="mailto:repeatedly@gmail.com" target="_blank">repeatedly@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>Applied!</div>
</blockquote><div><br></div><div> Great!</div><div><br></div><div>The only thing that still bugs me a little is the error messages:</div><div>"Cannot call popFront on empty range" should probably say something like "Cannot call popFront on Encoder with no data remaining", but it's really superficial.</div>
<div>The static asserts could also be improved (I know I did them in the first place)</div><div><br></div><div>static assert(Map62th < 'A' || Map62th > 'Z', "Character '" ~ Map62th ~ "' cannot be used twice");</div>
<div>static assert(Map62th != NoPadding, "'\\0' is not a valid base64 character");</div><div><br></div><div>Decoder currently advances partially on each call to front!  This code should be moved into popFront, or at the very least the result should be cached.</div>
<div>Encoder doesn't advance, but currently re-encodes the data on each call to front.  This should also be moved into popFront.</div><div><br></div><div>Decoder.front also currently uses array appending to build the input data.  It might be worth only reading several bytes off the next element of the input in order to avoid unnecessary allocations.</div>
<div><br></div><div>If this is only supposed to work with foreach, an opApply based design might be a better fit.</div><div><br></div><div>Daniel.</div></div>