lua-users home
lua-l archive

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


Shmuel Zeigerman wrote:
> Robert Raschke wrote:
>> Maybe the documentation needs to state that lines(), read("*n"), and
>> read("*l") work on text files, not binary? I don't think these
>> functions make any sense for binary files.
> 
> May be it needs to state something like:
> 
> "output of these functions is undefined if the processed file
> contain null characters"
> 
> (because there seems to be no standard providing definition
> of the term "text file").

IMHO, I think this exercise is useful, but I wonder about the
level of specification that the reference manual should aim for. I
mean, should we aim for a specification that is as exquisitely
specified as ECMA-262? (Ha ha, try reading that document from
cover-to-cover...)

Is there some way to make sure the reader sees a general caveat
that some fine details are necessarily dependent on the underlying
C implementation (Lua implementations are pretty malleable
anyhow)? Sure, a lot of things can be added if we want the
specification to be absolutely clear and unambiguous, but...

-- 
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia