lua-users home
lua-l archive

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


Tom Spilman wrote:
No, I don't believe so -- since 'everything' is dynamic, it
can't know that a function is empty until the moment it's
called.

    if ( function ) then function() end seems the way to go then.

Personally I wouldn't worry about it -- just call the empty
function.  If we preferred performance to clarity and ease, most
of us wouldn't be using a scripting language in the first place!

Regards,
--Adam
--
Adam D. Moss   . ,,^^   adam@gimp.org   http://www.foxbox.org/   co:3
"When I was young, I would break down and cry whenever mom made me
throw an empty toilet paper tube in the trash can. I just imagined
it sitting at the dump, all cardboard and sad." -- T.Farnon