DIP9 -- Redo toString API

spir denis.spir at gmail.com
Sun Nov 21 12:49:57 PST 2010


On Sun, 21 Nov 2010 17:28:09 +0100
Pelle Månsson <pelle.mansson at gmail.com> 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?)


Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com



More information about the Digitalmars-d mailing list