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

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Mar 17 13:02:35 PDT 2014


On Mon, Mar 17, 2014 at 03:52:48PM -0400, Etienne wrote:
> On 2014-03-16 12:58 PM, Andrei Alexandrescu wrote:
> >A classic idiom for reading lines and keeping them is f.byLine.map!(x
> >=> x.idup) to get strings instead of the buffer etc.
> >
> >The current behavior trips new users on occasion, and the idiom
> >solving it is very frequent. So what the heck - let's put that in a
> >function, expose and document it nicely, and call it a day.
> >
> >A good name would help a lot. Let's paint that bikeshed!
> >
> >
> >Andrei
> 
> .explode()
> 
> i saw it in PHP ;)

Ew. If I wanted to go the PHP route, I'd go for .detonate() instead --
at least there's a D in there! :-P

But what type would .explode() return? std.stdio.File.Explosion? :-P


T

-- 
It is the quality rather than the quantity that matters. -- Lucius Annaeus Seneca


More information about the Digitalmars-d mailing list