Want to read a whole file as utf-8

FG via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Feb 3 11:56:29 PST 2015


On 2015-02-03 at 20:50, Tobias Pankrath wrote:
> Use std.utf.validate instead of decode. It will only allocate one exception if necessary.

Looks to me like it uses decode internally...

But Foo, do you have to use @nogc? It still looks like it's work in progress,
and lack of it doesn't mean that the GC is actually involved in the function.
It will probably take several months for the obvious nogc parts of the std lib
to get annotated, and much longer to get rid of unnecessary use of the GC.
So maybe the solution for now is to verify the source code of the function in
question with ones own set of eyeballs and decide if it's good enough for use,
ie. doesn't leak too much?


More information about the Digitalmars-d-learn mailing list