lua-users home
lua-l archive

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


> -# Jadek #-

 I like this... two characters... little chance of them appearing in normal
code... similar to C/C++ comments.  What's the problem with using this?

  Tom


> -----Original Message-----
> From: lua-bounces@bazar2.conectiva.com.br 
> [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Jadek
> Sent: Sunday, June 20, 2004 12:05 AM
> To: Lua list
> Subject: Re: New long comments in 5.1
> 
> If there's issue about what characters might appear in code, 
> why not just use a
> character that's guaranteed never to appear in valid lua code?   @ is
> unused, as is # (for the most part).  I'm sure there's 
> others, but these are the easiest to type. ;)
> 
> If you require a preceding character, # becomes viable in all 
> cases, and it would allow visible similarity to current comments.
> 
> -- Comment
> -# Block Comment #-, or --# Block Comment #--, or whatever
> 
> Or you could even offer facility for the open and close block 
> comment tokens to be customizable... Though this is probably 
> asking for trouble.
> 
>   -# Jadek #-
> 
> At 11:39 AM 6/19/2004, you wrote:
> 
> 
> >How about:
> >
> >The TERMINATOR may never contains ']]'.
> >
> >This will make single line things work (as above) and:
> >
> >--[[
> >multiline comment
> >my favorite style :)
> >]]--
> >
> >(the terminating -- is of course optional, but I like them 
> for visual 
> >symmetry :)
> >
> >--[[my.html
> ><HTTP>...whatever
> >my.html]]
> >
> >If one wants, '*'s can be used as terminators:
> >
> >--[[***
> >***]]
> >
> >
> >Philippe Lhoste wrote:
> >>
> >>Mmmm, not so bright, it is incompatible with simple use of 
> this string, like:
> >>path = [[C:\Good Languages\Lua\Bright Script.lua]]
> >>
> >>unless we make additional rules like:
> >>
> >>Single line literal strings/comments use old syntax, multiline ones 
> >>always starts with new line or HereDoc terminator.
> >>
> >>Or we use foo = [[[TERMINATOR
> >>but I like it less (more exceptions).
> 
> 
>