lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

On Feb 21, 2014, at 24:50 , Cezary H. Noweta wrote:
...

Actually the C standard library of all platforms, including Windows,
works just fine.

Indeed, the standard does not explicitly nor implicitly (i.e. by
providing a ,,shall'' or ,,shall not'' requirement) define that thing as
,,undefined behavior''.

I just want everything the C library returned in the string. And I did
not complain, I proposed working patches to do so.

The next time you parse a text file which accidental has a \0 somewhere
you probably want this bug fix, too ;-) Especially after you spend hours
to figure out what is going on, …

Certainly, ,,... is '\0' aware'' sounds like Zeus' thunderbolt and makes
the world more beautiful. IMHO, at least, a documentation note should be
appended to a description of ,,io.lines'', ,,file:lines'', ,,file:read''
- it would have greatly shortened that figuring-out-time.

Updating documentation is great and everyone loves to read documentation.

At the end of the day, however, you write a script and may hit this issue. After fighting and wondering I usually do not start to reread a language manual for exceptions and known issues, I take a look at the strace, and such, and open the source code to see what's going on. Usually faster than cross reading over a manual in the hope to find a note eventually.

-- 
 ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin
 http://exactcode.com | http://exactscan.com | http://ocrkit.com | http://t2-project.org | http://rene.rebe.de