Page 1 of 1
Comments in v7?
Posted: 2013-06-15T19:18:15-07:00
by snibgo
As v7 has a slightly more formal scripting language, can I submit a mild request for comments? IM would ignore all characters between an open-comment and close-comment token. This could be useful during script development, to temporarily remove code, as well as allowing human-readable comments.
For the comment tokens, I suggest the usual C-language /* and */ .
Should comments be nestable? I suggest they should be, though I can see the argument against.
Re: Comments in v7?
Posted: 2013-06-29T15:12:24-07:00
by glennrp
snibgo wrote:As v7 has a slightly more formal scripting language, can I submit a mild request for comments? IM would ignore all characters between an open-comment and close-comment token. This could be useful during script development, to temporarily remove code, as well as allowing human-readable comments.
For the comment tokens, I suggest the usual C-language /* and */ .
Should comments be nestable? I suggest they should be, though I can see the argument against.
I like open-comment=#, close-comment=end-of-line as well.
I don't see a need for nested comments; they aren't allowed in C and could be error-prone. If you really need
to nest comments you could do something like this, if we accept both kinds of comments:
Code: Select all
# Super-duper redeye reduction script
begin
do this
do more
#
# /* experimental */
# bad code
#
do more
end