One Disadvantage to Lua
One Disadvantage to Lua
Last edited by Skofo on Mon Feb 16, 2009 9:42 pm, edited 1 time in total.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: One Disadvantage to Using Lua
Yeah.. well if you were coding C and you just happened to have */ in your code... that's always the problem with multiline comments, isn't it? Maybe you can just try adding a space?
Re: One Disadvantage to Using Lua
Neat idea, thanks!
I still think that Lua could use something better for multi-line comments, though. Lua seems very table-oriented so it's natural for many double-brackets to be around.
I still think that Lua could use something better for multi-line comments, though. Lua seems very table-oriented so it's natural for many double-brackets to be around.
Re: One Disadvantage to Lua
I... did not know that Lua had multi-line comments.
I'm retarded.
I'm retarded.
Now posting IN STEREO (where available)
Re: One Disadvantage to Lua
you can use [[ and ]] for multi line strings too (well, i haven't tried in love yet so..)
Re: One Disadvantage to Lua
it's typically better to use the following multi-line comment style in lua, note the use of abitrary but matching equals signs.
That way you have to match the number of equals signs and have less chance of leaving code accidentally enabled.
Code: Select all
function lol( rofl )
--[===[
crash()
]===]
end
- counterfactual_jones
- Prole
- Posts: 24
- Joined: Mon Feb 09, 2009 10:14 am
Re: One Disadvantage to Lua
Is it me or does
resemble
Code: Select all
--[==[
--]==]
Code: Select all
B====D~~~
Re: One Disadvantage to Lua
Oooh, very cool tip. Thank you!Inny wrote:it's typically better to use the following multi-line comment style in lua, note the use of abitrary but matching equals signs.That way you have to match the number of equals signs and have less chance of leaving code accidentally enabled.Code: Select all
function lol( rofl ) --[===[ crash() ]===] end
Re: One Disadvantage to Lua
I have never seen/heard/read about that anywhere in the 3 years I've been using Lua. This is excellent, I like to nest commented blocks sometimes for testing and this will be most useful. Thanks!Inny wrote:it's typically better to use the following multi-line comment style in lua, note the use of abitrary but matching equals signs.
Who is online
Users browsing this forum: Google [Bot] and 1 guest