<br><br><div class="gmail_quote">On Thu, Oct 14, 2010 at 12:12 PM, Masahiro Nakagawa <span dir="ltr"><<a href="mailto:repeatedly@gmail.com">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 class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">1. The template parameters '!' and '/' are not justified. They should be runtime parameters. Rule of thumb: use generic code when you stand to profit.<br>
</blockquote>
<br></div>
I don't understand this point.<br>
Please tell me the merit of runtime parameters.<br>
I can't imagine such situations.<div class="im"><br></div></blockquote><div><br></div><div>I actually really like the Base64Impl. It allows you to build DecodeMap statically, and provides a very nice api for using custom base64 variations. I'm not sure how you'd do anything this nice with runtime parameters.</div>
<div><br></div><div>alias Base64('^', '&', Base64.NoPadding) CustomBase64;</div><div>CustomBase64.encode(data)</div><div>CustomBase64.decode(encodeddata)</div><div><br></div><div>vs</div><div><br></div>
<div>encode(data, '^', '&', Base64.NoPadding);</div><div>decode(encodeddata, '^', '&', Base64.NoPadding);</div><div><br></div><div>I didn't really see this until I started using it. :)</div>
</div>