[erlang-questions] question: macro definition
Tue Jan 15 23:05:22 CET 2008
Robert Virding wrote:
> On 15/01/2008, *Ahmed Ali* <ahmed.nawras@REDACTED
> <mailto:ahmed.nawras@REDACTED>> wrote:
> Does (redefining) mean I cannot define a macro with the same name
> even though they have different arity?
> That is exactly what it means. It was a mistake to do it that way. But
> it could be corrected now if people really want it.
I would be interested in a quick pros & cons of this. As I understand it
C/C++ has the same "uniquely named" macro functionality.
As I see it, having macros with arity (i.e. LOG/1 and LOG/2) would be
the Erlang equivalent of declaring a function as "inline". What
advantages would this have given I technically could have the equivalent
of LOG1 & LOG2 macros?
Nto arguing one way or the other, but Robert mentioned it as a mistake
and I'm curious as to the reasons for and against such a "mistake".
More information about the erlang-questions