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

Regan Heath regan at netmail.co.nz
Tue Mar 18 07:57:28 PDT 2014


On Tue, 18 Mar 2014 14:09:05 -0000, Dicebot <public at dicebot.lv> wrote:

> On Tuesday, 18 March 2014 at 13:49:45 UTC, Steven Schveighoffer wrote:
>> On Sun, 16 Mar 2014 12:58:38 -0400, Andrei Alexandrescu  
>> <SeeWebsiteForEmail at erdani.org> 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!
>>
>> byImmutableLines
>> byStringLines
>>
>> -Steve
>
> byPersistLines ?

Why this fixation on "by"?

lines
allLines
eachLine
everyLine

R

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d mailing list