[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Feature proposal: \x## notation in strings
- From: Eike Decker <zet23t@...>
- Date: Tue, 10 Mar 2009 08:38:05 +0100
> Peter Cawley wrote:
> Not to mention that the hex notation follows the Principle Of Least
> Surprise, which the decimal one doesn't; take the following two sequences:
> One of these contains a nasty surprise...
Hm. I don't get it:
Lua 5.1.3 Copyright (C) 1994-2008 Lua.org, PUC-Rio
It is just the way I would expect it - at least in Lua. I would have
been surprised if \0xx would be an octal notation in Lua....
Though I do agree that a hexadecimal notation in strings would be more
convenient in quite a few cases than the decimal notation. Actually,
when I once built a binary string, I was surprised that Lua supports
only decimal values.
A Lua function that converts strings in a more convenient way is
possible, but I think it would be nice if the compiler would support