lua-users home
lua-l archive

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

I can only say that i quickly got used to the -- syntax for line comments,
but i have to agree on the missing block comments: this really bites. And
since Lua 4.0, the "$if nil" mechanism doesn't exist any more!
Here is what i use if i have to disable a large block of code:

local commented_out = [[
	whatever( code, you + want [ disabled ] );

this is of course creating an unused string - ouch.


-----Original Message-----
[]On Behalf Of Brian Hook
Sent: Saturday, September 22, 2001 3:15 AM
To: Multiple recipients of list
Subject: Two small questions/comments

1.  This has probable come up before, but why doesn't Lua have more
standard comment types (-- always seems like either a hyphen, dash or
decrement to me), including a block comment ability like /* */.  Is the
"$if nil" mechanism completely like #if 0, or does it still parse the
code inside the block?

2.  My biggest problem so far has been the documentation.  I just
finally stumbled on the definition of lua_pushuserdata -- I thought it
was deprecated because it doesn't show up AT ALL in the reference manual
or the draft book.  It would be nice if macros were notated in some way
so that it's obvious that they're macros, e.g. LUA_PUSHUSERTAG() or

So far I like the language quite a bit, it's pretty straight forward in
its operation.  When I can find the documentation =)