spir wrote: > On Sun, 21 Nov 2010 17:28:09 +0100 > Pelle Månsson <[email protected]> wrote: > >> However, writeln can do this: >> >> foreach (arg; args) { >> arg.writeTo((const(char)[] data) { outputbuffer.put(data); }) >> } >> >> thereby removing the need to store the string, and the extra allocations. >> >> This design is much cleaner than the current strategy, and also more >> flexible. > > (Sorry for the irony.) "Make simple things easy." Have to write a delegate to > get feedback... to print a bit of text. > (What is "hello, world!" in D?) > Like others have said, the only change to user code is that you will write "to!string (x)" instead of "x.toString()" How is that less easy?
Jerome
--
mailto:[email protected]
http://jeberger.free.fr
Jabber: [email protected]
signature.asc
Description: OpenPGP digital signature
