[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: io:lines() and \0
- From: Andrew Starks <andrew.starks@...>
- Date: Sat, 22 Feb 2014 08:30:27 -0600
On Saturday, February 22, 2014, steve donovan <steve.j.donovan@gmail.com> wrote:
On Sat, Feb 22, 2014 at 3:32 PM, Andrew Starks <andrew.starks@trms.com> wrote:
> If lines was deprecated, an option *could* be to add another modifier
Oh no, I use that all the time! It would be like banning dogs because
sometimes they bite children.
> Something like "read until a specified string of symbols or end of
> file."
And that would be very do-able as a useful C extension
steve d.
And could it also serve as a replacement for "lines", which slowly creeps towards ambiguity? It seems as though it'd be quite straight forward to implement and "lines" might be preserved as a call to it. This is pretty close to earlier suggestions such as "while c ~= '\n'" but provides for other matches.
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. It would be slower, but I doubt it would show up as significant in an application that does real work.
- 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