On 11/09/14 21:02, eles wrote:

Could you provide one or two short but illustrative examples in Tango
and Phobos showing the howto and the why not in Phobos?

Tango:

import tango.text.Unicode;

void foo ()
{
    char[3] result; // pre-allocate buffer on the stack
    auto b = "foo".toUpper(result);
}

Phobos:

import std.uni;

void foo ()
{
    auto b = "foo".toUpper(); // no way to use a pre-allocated buffer
}

Will Andrei's allocators improve that with some rewrite of Phobos?

Yes, they could.

--
/Jacob Carlborg

Reply via email to