lua-users home
lua-l archive

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


On Tue, Apr 6, 2010 at 9:41 AM, Pan Shi Zhu <pan.shizhu@gmail.com> wrote:
> does it provide any advantage calling assert(loadfile(...))()  instead
> of dofile() ?

It does have different semantics - the first form throws an exception,
the second one is protected. To get the same semantics, you need more
checking, so dofile() is best.

> we probably need a dostring() or eval(), instead of remove the dofile().

We used to have a dostring(), but it's an easy function to write.