lua-users home
lua-l archive

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


On Fri, Apr 2, 2010 at 4:49 PM, Stuart P. Bentley <stuart@testtrack4.com> wrote:
> If the accepted idiom for doing a string is assert(loadstring(...))(), why
> not remove dofile and just use assert(loadfile(...))() in its place?

Because people are used to it ? ;)   I think it does no harm, but to
make it robustly handle errors requires pcall and then you end up with
something of equivalent complexity anyway...