|
On 2014-05-14 4:47 AM, "Axel Kittenberger" <axkibe@gmail.com> wrote:
>
> local season = 's'
> ...
> local text =
> ({
> s = 'summer term',
> w = 'winter term'
> })[ season ]
>
> Why do I need brackets around the curly brackets?
>
> Why is
>
> local text =
> {
> s = 'summer term',
> w = 'winter term'
> }[ season ]
>
> not valid?
>
> Its no deal breaker, so I do brackets. But I just wonder...
>
> Kind regards, Axel
I don't know the exact reasoning, but I'll note that these also won't work:
{f=print}:f()
"hi":upper ()
Both cases also require parens.