Re: load, loadfile etc
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: load, loadfile etc
- From: Lorenzo Donati <lorenzodonatibz@...>
- Date: 2011年8月03日 16:26:46 +0200
On 03/08/2011 14.45, Luiz Henrique de Figueiredo wrote:
Instead of adding functionality to 'loadfile', another way could
be to extend 'load' further to accept an opened file as argument,
i.e. the following would be equivalent:
loadfile "xxx"
load(io.open "xxx")
What is the main argument against this?
Try this:
load(io.lines"xxx")
Just to be sure: is load(io.lines "xxx") equivalent to loadfile "xxx"
right now? (Both 5.1.4 and 5.2?)
Or is loadfile somewhat optimized for the task it does?
TIA
-- Lorenzo