[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANNOUNCE] Lua 5.0 (work0)
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 06 Jun 2002 15:10:22 -0300
>> I'm still not sure where dofile() is located.
Currently dofile is gone. It is more or less the same that
loadfile(f)()
We will put it back, but the new version will not do error handling.
That is, the new dofile will be equivalent to
assert(old_dofile(f))
We want to concentrate all error handling in pcall. (This also solves
the problem of the ambiguity between errors and dofiles that return
nil.)
But we intend to remove dostring. The new "loadstring" allows much
better control of errors, and dostring is almost always involved with
error handling. A "dostring" that propagates errors (like the new dofile)
is not very useful.
-- Roberto