Re: io:lines() and 0円
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: io:lines() and 0円
- From: steve donovan <steve.j.donovan@...>
- Date: 2014年2月22日 16:47:19 +0200
On Sat, Feb 22, 2014 at 4:30 PM, Andrew Starks <andrew.starks@trms.com> wrote:
> I don't want to be the guy that advocates for banning dogs, though. It just
> seems that "lines" doesn't deserve the elevated status it enjoys, when a
> simple and more general alternative could serve as well and be more robust.
But it's a straightforward API, and it works well - assuming you have
trusted, non-garbled and non-pathological ASCII text files. When I
write text-wrangling scripts, practically the first thing I write is
'for line in io.lines(f)...'. So I'm particularly fond of this dog.
I see the extension for those cases where you need to be paranoid, and
to deal with odd files which contain nuls and yet are sufficiently
structured that '\n' actually is a delimiter. Because naturally
applying even the most intelligent readline() to an arbitrary file
will give arbitrary results.
- References:
- io:lines() and 0円, René Rebe
- Re: io:lines() and 0円, steve donovan
- Re: io:lines() and 0円, René Rebe
- Re: io:lines() and 0円, Enrico Colombini
- Re: io:lines() and 0円, steve donovan
- Re: io:lines() and 0円, René Rebe
- Re: io:lines() and 0円, Craig Barnes
- Re: io:lines() and 0円, René Rebe
- Re: io:lines() and 0円, Sean Conner
- Re: io:lines() and 0円, René Rebe
- Re: io:lines() and 0円, Tim Hill
- RE: io:lines() and 0円, Thijs Schreijer
- Re: io:lines() and 0円, Enrico Colombini
- Re: io:lines() and 0円, Andrew Starks
- Re: io:lines() and 0円, Enrico Colombini
- Re: io:lines() and 0円, Andrew Starks
- Re: io:lines() and 0円, steve donovan
- Re: io:lines() and 0円, Andrew Starks