[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: multiline comment: triple '-' format
- From: spir <denis.spir@...>
- Date: Sat, 12 Dec 2009 11:18:19 +0100
Tobias Kieslich <tobias@justdreams.de> dixit:
> Hi,
>
> I have an idea where you are coming from and nice code is always good
> but especially the the multiline stuff in Lua is nice because even
> though it is a tad noisier it actually allows for nested comments:
>
> --[=[
> chunk of code
> --[[
> Longish comment ...
> --]]
> code
> --]=]
>
> which makes it really easy to take out code segments for testing. That
> is a powerful feature I don't wanna miss.
>
> -T
>
Thanks for the explaination. Precisely I wondered about nested comments' use case. (About the purpose of such a complicated syntax for comments and string.) What about nested (multiline) strings?
Denis
PS: I don't wish lua be more whatever-language-like. (Except I would be pleased if mainline languages had adopted concatenative postfix syntax instead, as it brings imo relevant advantages.) But I find sensible to watch what others do well, when it can fit the rest of our language.
________________________________
la vita e estrany
http://spir.wikidot.com/