On Saturday, 25 May 2013 at 02:41:00 UTC, Brad Anderson wrote:
On Friday, 24 May 2013 at 19:44:23 UTC, Jonathan M Davis wrote:
We already have stuff like format vs formattedWrite where one allocates and the other takes an output range. We should adopt that practice in general. Where possible, it should probably be done with an overload of the function, but where that's not possible, we can simply create a new function with a similar
name.

Sounds good to me. Should the overloads return the output range or void?

If it returned the output range it would be possible to make another function which returns a temporary output range and then easily chain together function calls:

CallWindowsApiW(mystr.writeUTF16z(tempBuffer()))

No GC allocation but not an unpleasant syntax either.

Reply via email to