Re: [Flex-devel] api change for [yy]input()
flex is a tool for generating scanners
Brought to you by:
wlestes
From: Will E. <wes...@gm...> - 2017-06-25 19:34:48
|
On Monday, 22 May 2017, 11:10 pm +0000, Nate Rosenblum <na...@go...> wrote: > I recently discovered that the behavior of input() has changed from > returning EOF at end of file to returning 0. Searching around I came across > a closed github issue (https://github.com/westes/flex/issues/212), but this > really feels like something for the mailing list. So: > > Why change this return value, potentially breaking callers? Is it simply > because Apple chose to do so ( > https://opensource.apple.com/source/flex/flex-26/patches/scanEOF.diff.auto.html)? > If that's the case, perhaps the man page should be updated to match. There was a reason why, but it escapes me. It's on my list and I keep thinking I will get to it and I keep not getting to it. I imagine this involves looking at the code and git blame in various ways. It was not solely because Apple. There was some particular thing that made me think it was a good idea. If you can point me to an example in the wild where this is a problem, that helps a bunch. Failing that, your point about updating the documentation is a good one -- and pull requests against github are easy for me to process. |