Re: Pros and cons of macro versus functions

2010-10-18 Thread Mike Meyer
On Mon, 18 Oct 2010 08:58:48 -0400 (EDT) lprefonta...@softaddicts.ca wrote: > Choose functions over macros when you can write an equivalent function. >From the LISP community, I'd put it slightly stronger: Only use macros when you have to. But you get the same set of reasons (with explanations).

Re: Pros and cons of macro versus functions

2010-10-18 Thread lprefontaine
Choose functions over macros when you can write an equivalent function. I use macros when: a) I have a repetitive pattern in the code that cannot be easily turned into a function (too much context to pass as args to a function). You can then hide a binding form in the macro to refer to the