lua-users home
lua-l archive

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


What is wrong with something like [[[   ]]] ?  That is really easy to type.

Michael

----- Original Message ----- 
From: "Eric Tetz" <erictetz@gmail.com>
To: "Lua list" <lua@bazar2.conectiva.com.br>
Sent: Friday, June 18, 2004 11:17 AM
Subject: Re: New long comments in 5.1


> Roberto Ierusalimschy wrote:
> > An identifier is ambiguous; e.g., a[b[x]] = 3; (Remember that this
> > syntax is not only for comments, but for long strings, too.)  More
> > often than not we will use zero, one, or at most two asterisks.
> 
> But you are already using an identifier, it just has severe
> constraints on the characters it can be made of (only '*'). It seems
> you are counting on that fact that "a[b[*]]" is less likely to
> appear in a comment or string than "a[b[x]]". If you allow an
> arbitrary identifier, people can still choose "*" or "*****" if
> that's most appropriate.
> 
> Anyway, if it must be a single character, I vote for '-' over '*'.
> 
> --[--[
> 
> --]--]
> 
> Still looks goofy, but better than --[**[ --]**].
> 
> What about using something like the "here file" syntax from Unix?
> 
> 
> --__ARBITRARY_IDENTIFIER__
>   blah
>   this is a long comment
>   blah
> __ARBITRARY_IDENTIFIER__
> 
> 
> [[__ARBITRARY_IDENTIFIER__
>   blah
>   this is a long string
>   blah
> __ARBITRARY_IDENTIFIER__
>