On Thursday, 26 January 2017 at 19:30:54 UTC, Suliman wrote:
But I still not understand where the data is location in first
variant?
It is stored in the file itself. The File struct is pretty small,
it just provides access to the contents of the file, it doesn't
actually hold that content
In the past I asked Adam about when I should use keyword `new`
with structures and got next answer:
"The File in the first one is put on the stack as a reference
counted
local object whereas the second one would be on the garbage
collected
heap, which often isn't what you want for files since