[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is dofile really called for anymore?
- From: Pan Shi Zhu <pan.shizhu@...>
- Date: Tue, 6 Apr 2010 15:41:54 +0800
On Fri, Apr 2, 2010 at 10: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? The
> only reason I can see dofile() having its own function is for opening Lua
> libraries, from before require() was introduced.
does it provide any advantage calling assert(loadfile(...))() instead
of dofile() ?
I can't see any reason using assert(loadfile(...))()
we probably need a dostring() or eval(), instead of remove the dofile().