[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Feature proposal: \x## notation in strings
- From: Diego Nehab <diego@...>
- Date: Thu, 12 Mar 2009 17:25:16 -0400 (EDT)
Hi,
Plus I just took into account that despite all my years doing low-level
stuff on PCs, I can still count (and add, and definitely multiply) in my
head far better in decimal than any other base...
Still, I would wager that typing bytes into a string in
decimal (how often does one represent IP in four bytes as a
Lua strings anyways?) is much less common than hexadecimal.
The bloat argument is a very good one. But in that case, we
should have hexadecimals, "\xhh" defining single byte,
always with two hex "digits", instead of decimals.
I think that "\0" could be a special case, much like "\n" is
a special case today.
The Hind/Passanti idea ("something" 23 "something else"
0x33) is intriguing, but I don't know how much it would
affect the parser. It also looks too much like currying to
me.
Regards,
Diego