Phobos packages a bit confusing

retard re at tard.com.invalid
Mon Nov 30 03:23:34 PST 2009


Mon, 30 Nov 2009 12:01:22 +0100, Ary Borenszweig wrote:

> KennyTM~ wrote:
>>>> By
>>>> far the two most important pieces of I/O functionality I need are:
>>>>
>>>> 1.  Read a text file line-by-line.
>>>
>>> foreach (line; new Lines!(char) (new File ("foobar.txt")))
>>>    Cout (line).newline;
>>> }
>>>
>>>
>> yuck.
> 
> Yuck?? I find that code very elegant. How would you like it to be?

I guess something like this:

JustDoItWith("foobar.txt") {
  ...
}



More information about the Digitalmars-d mailing list