V Fri, 12 Sep 2014 08:47:55 +0200
Jacob Carlborg via Digitalmars-d <[email protected]> napsáno:

> 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.
> 

toUpperInPlace could help little, but still not perfect

Reply via email to