Module for manual memory management

Foo via Digitalmars-d digitalmars-d at puremagic.com
Wed Feb 4 13:39:34 PST 2015


On Wednesday, 4 February 2015 at 20:55:59 UTC, Walter Bright 
wrote:
> On 2/4/2015 12:42 PM, Foo wrote:
>> On Wednesday, 4 February 2015 at 20:15:37 UTC, Andrei 
>> Alexandrescu wrote:
>>> @trusted
>>> @nogc
>>> char[] read(const string filename) nothrow {
>> Yes that is correct, currently there is no error checking, 
>> maybe it get that
>> later. But what do you mean with "it use more operations than 
>> necessary"? I
>> can't see it. But both points are helpful critique. Thanks a 
>> lot! :)
>
> No need to reinvent this:
>
>   
> https://github.com/D-Programming-Language/phobos/blob/master/std/file.d
>   line 194
>
> Just use it and change the allocator bit.

Yes, I've also looked at that. But I think my code is more 
readable and easier to understand. But I will take a second look. 
;)

BTW: You can redirect to the line by adding #194: 
https://github.com/D-Programming-Language/phobos/blob/master/std/file.d#L194 
just click on the line number on the left.


More information about the Digitalmars-d mailing list