[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (beta-rc5) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 5 Jul 2011 10:58:36 -0300
> Could you then at least throw an error for unknown escape
> sequences, for example "\o" gives "undefined escape sequence
> near \o"?
In general, Lua does not check every possible undefined behavior to
ensure future compatibility. For instance, Lua does not check for extra
parameters in calls; functions that get new parameters in 5.2 assume
that users did not provide meaningless extra parameters in 5.1.
> That way one can later safely add escape sequences
> without silent failure of existing scripts, like this:
>
> Lua-5.1: print(#"\xaa") --> 3
> Lua-5.2: print(#"\xaa") --> 1
How many scripts do you think will fail with this addition of '\x'?
(More probably, some scripts will silently start to work ;)
-- Roberto