[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: do you use the pre-processor?
- From: rw20@...
- Date: Wed, 10 May 2000 18:40:19 -0400 (EDT)
Large projects really need a way to include and exclude code at compile
time. A _much_ cleaner solution would be to have a compiler that can
optimize on preprocessor defined boolean tokens which are constant and not
part of the chunks namespace. If the token is false then the compiler
would optimize the chunk away.
Something like
$define debugging true
function test(x)
if debugging then
if type(x) ~= 'table' then
RuntimeError('x is not a table')
end
end
print(x.name)
end
Having only one such token to set would cover 90% of the cases.
Russ