Good name for f.byLine.map!(x => x.idup)?

bearophile bearophileHUGS at lycos.com
Sun Mar 16 10:58:44 PDT 2014


Andrei Alexandrescu:

>> "byDupLines"
>
> It introduces the notion of "dup" to newbies. I'd rather go 
> with a natural name.

In Python you write:

for line in file("text.txt"):
     ...


So can't you make File iterable?

foreach (line; "text.txt".File) {}

Bye,
bearophile


More information about the Digitalmars-d mailing list