lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Jun 15, 2011 at 19:03, David Manura <dm.lua@math2.org> wrote:
> On Wed, Jun 15, 2011 at 6:35 PM, Tony Finch <dot@dotat.at> wrote:
>> Given the constraints of the parser I prefer @label or ::label without
>> trailing punctuation. (If you want a terminator you can add one or more
>> semicolons.)
>
> Moreover, this misleadingly resembles a method call:
>
>  @y: f()
>
> Note that 5.2.0-beta-rc1 ignores spaces inside the label, and labels
> are statements, so these are both identical:
>
>  @y:; f()
>  @  y  :  f()
>
> My thought is to omit the colon and and use a space:
>
>  @ y
>
> When you read that, you can think of it or verbalize it as
>
>  at y
>
> Here, "@" is not a sigil modifying the identifier y, but rather it *is
> a keyword*.  Coding style guidelines often recommend spaces around
> keywords, even if the syntax doesn't always require it ("if(x)then
> g()end").
>
> As further argument that "@" is not a sigil, we write "goto y" not "goto @y".
>
>

That was why I suggested double colons, to distinguish it from method calls.

-- 
Sent from my toaster.