<div>On Tue, Nov 2, 2010 at 3:30 PM, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:andrei@erdani.com">andrei@erdani.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<div class="im">On 11/2/10 3:16 PM, kenji hara wrote:<br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
And, I do not recommend following use of expand:<br>writeline(mixin(expand!"take $n times."));<br><br>The probrem is:<br>- expand concatenates string by ~ operators, it is may cost than using<br>appender(text, formatWrite, writefln...)<br>
<br>I will remove ddoc example from github code.<br></blockquote><br></div>Expand should have an option to expand with commas and without to!string, i.e. in order to make the code:<br><br>writeln(mixin(anotherexpand!"take $n times."));<br>
<br>identical 100% with the code<br><br>writeln("take ", n, " times.");<br><br>Not sure what's the best name for "anotherexpand".<br><font color="#888888"><br>Andrei</font><div><div></div>
<div class="h5"><br>_______________________________________________<br>phobos mailing list<br><a href="mailto:phobos@puremagic.com" target="_blank">phobos@puremagic.com</a><br><a href="http://lists.puremagic.com/mailman/listinfo/phobos" target="_blank">http://lists.puremagic.com/mailman/listinfo/phobos</a><br>
</div></div><div><br></div></blockquote></div><div><br></div>Something like expandsplit?<div>I'm thinking of that because Python has "one two three".split()<br></div>