On 9/5/11 12:22 AM, Walter Bright wrote:
On 9/4/2011 7:34 PM, Andrei Alexandrescu wrote:
On 9/4/11 22:20 EDT, kenji hara wrote:
2011/9/4 Andrei Alexandrescu<seewebsiteforem...@erdani.org>:
There are suggestions to add this method to Object:

void writeTo(void delegate(const(char)[]) sink, string format = null);

I think const void toString(scope void delegate(const(char)[]) sink,
string format = null); is more better than that, even if it is
different from DIP9.
That is already used in std.bigint, std.complex, and std.format
already support it.

Kenji Hara

Works for me. Walter?

It'll break every D program.

Probably you and I have a different thing in mind. I'm thinking of adding that alongside the existing toString.

Thinking more about it, I fear that ascribing the two overloads the same name will cause problems when e.g. a class overrides one overload thus hiding the other.

So we should look for a different name. Which?


Andrei

Reply via email to