On Thu, Oct 14, 2010 at 12:12 PM, Masahiro Nakagawa <[email protected]>wrote:
> 1. The template parameters '!' and '/' are not justified. They should be
>> runtime parameters. Rule of thumb: use generic code when you stand to
>> profit.
>>
>
> I don't understand this point.
> Please tell me the merit of runtime parameters.
> I can't imagine such situations.
>
>
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.
alias Base64('^', '&', Base64.NoPadding) CustomBase64;
CustomBase64.encode(data)
CustomBase64.decode(encodeddata)
vs
encode(data, '^', '&', Base64.NoPadding);
decode(encodeddata, '^', '&', Base64.NoPadding);
I didn't really see this until I started using it. :)
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos