[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: load, loadfile etc
- From: Dirk Laurie <dpl@...>
- Date: Wed, 3 Aug 2011 13:44:55 +0200
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?