lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sat, Oct 14, 2017 at 11:13 AM, Sean Conner wrote:

  First off, %z was deprecated in Lua 5.2 (see section 8.2), and it's not
mentioned at all in the Lua 5.3 manual (although my version of Lua 5.3
does run the above code).

I hope %z and %Z patterns will stay forever in Lua:
1) They are very handy in use (as binary zero is a very special symbol deserving its own pattern).
2) Without %z and %Z we will not be able to write a binary-zeroes-related pattern working in both Lua 5.1 and Lua 5.3.

Removing %z and %Z from Lua has only disadvantages.
Actually, we will have to complicate our scripts to check Lua version in runtime and apply version-specific pattern to make our code work in all Lua versions.
That's a headache.

I see no benefit of removing %z and %Z from Lua .

 
  Here is some code that works (and maybe even Soni
would like it, as it's not limited to '"' as the quote character---it can be
any string, and said string can appear escaped!):


Your code does not look like a simplification of Sony's code  ;-)