[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0
- From: Martin <eden_martin_fuhrspam@...>
- Date: Thu, 14 Jul 2016 08:20:44 -0700
On 16-07-13 04:41 AM, Egor Skriptunoff wrote:
> We already have similar "features" in Lua:
> x = t[ [=[a]=]] -- x = t.a
> y = t[[=[a]=]] -- y = t("=[a]=")
>
Yes. And do not forget to add long comments ("--[[]]") to these hash.
And some of you wish to add [] as array declaration. Lua code then be
look like a maze.
Looks like we just ran out of available one-symbol group markers (
(){}[] ). We may extend existing to "long" variable-size versions as
done in quotes. For example "(~(", "{~{", "[~[". But this looks sick. Or
use Unicode. But this is hard.