[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is dofile really called for anymore?
- From: steve donovan <steve.j.donovan@...>
- Date: Sat, 3 Apr 2010 09:10:48 +0200
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...