[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: Tue, 6 Apr 2010 09:58:00 +0200
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.