[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (beta-rc1) now available
- From: David Kolf <kolf@...>
- Date: Thu, 16 Jun 2011 08:18:08 +0200
Drake Wilson wrote:
> Perhaps I missed an earlier discussion, but why a \* escape rather
> than using \ before a newline? Using \ plus a non-alphanumeric
> printing character as an escape can be confusing, in my experience.
The earlier discussion was here:
http://lua-users.org/lists/lua-l/2010-04/msg00053.html
The problem is that "\<newline>" is already used by Lua and it adds a
newline to the string. (That means, "\<nl>" in Lua equals "\n\<nl>" in
C). It cannot be changed now as that would break lots of existing code
without even giving any error messages.
My suggestion back then was to use "\-" since the hyphen is often used
in other text to concatenate split words. To me that would look more
familiar than "\*" which I would associate with wildcards. However, it
still is a non-alphanumeric.
"Some \*
test"
vs.
"Some \-
test"
-- David