[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: load, loadfile etc
- From: Duncan Cross <duncan.cross@...>
- Date: Wed, 3 Aug 2011 15:32:17 +0100
On Wed, Aug 3, 2011 at 1:45 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> 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")
Doesn't it need to be load(io.lines("xxx", "*L"))?