lua-users home
lua-l archive

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



On Jan 14, 2008 3:35 PM, Jeff Wise <jwise@sealyrealty.com> wrote:
My intuition tells me that there would have been a larger number of functions than macros to handle all the nuances of the requirements.

You're probably right. Many developers have a runtime optimization fetish, i.e. they feel a compulsive urge to save microseconds at execution time, if necessary at the expenses of maintainability. Moreover, the contraptions they invent to "save time" often turn out to be inefficient or even counter-productive :)

Macros act as a partial fix to that psychological issue: few developers feel like optimizing their compilation times, so they're willing to do some macro-based code refactoring that they wouldn't consider if it impacted runtime execution. The flip side is that they use a dangerous powertool (CTMP) when it's not actually required, and sometimes hurt themselves needlessly.

-- Fabien.