[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: load, loadfile etc
- From: liam mail <liam.list@...>
- Date: Wed, 3 Aug 2011 12:55:41 +0100
On 3 August 2011 12:44, Dirk Laurie <firstname.lastname@example.org>
Lua 5.2 has subsumed the functionality of 'loadstring' into 'load',
but 'loadfile' is still there, because its argument is a filename,
i.e. also a string.
For 'load' there is now an optional 'env' argument, thus 'loadin'
has also been subsumed into 'load'. But there is no such argument
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:
What is the main argument against this?
Don't you think load _already_ has too many responsibilities ?