[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: loadstring vs load
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 8 Dec 2010 09:29:05 -0200
> Lua 5.2 allows
> load("return ...")
> where Lua 5.1 required
> loadstring("return ...")
> Is there still a good reason to continue using loadstring?
> Is it scheduled for deprecation?
Probably it will be.
Note that load(s), unlike loadstring(s), does not accept binary strings.
As binary code is potentially unsecure, this seems good. You still can
make 'load' accept binary code supplying a third 'mode' argument.