On Wednesday, 27 May 2015 at 08:38:48 UTC, Per Nordlöw wrote:
AFAIK, in current DMD, I can't get any help in avoiding
patterns such as
char[] saved_line;
foreach (line; File("foo.txt").byLine)
{
saved_line = line; // should give error
}
If I understand you correctly, a new kind of qualifier for `line` may be motivated here. The semantic meaning of `scope` D is not related to volatile property. I guess the problem is somewhat related to reference counting and ownership, right.
