Macros and keywords, R9C2
Wed Sep 8 16:26:46 CEST 2004
I understand the reasoning, but from a practical perspective, isn't it
better to stay away from names like that - just to avoid confusion?
(Especially with newbies)
case ?begin of
case ?BEGIN_PORT of
A bit far fetched though :)
On Wed, 2004-09-08 at 16:08, Thomas Lindgren wrote:
> You currently can't define macros with the same name
> as keywords:
> -define(begin, 4711).
> -define(end, 11147).
> % compiler complains "badly formed define"
> However, this restriction is, as far as I can see,
> unnecessary: the namespaces are entirely distinct.
> That is, when you subsequently use the macro, it will
> be written '?begin', which will never be confused with
> plain 'begin'.
> Hence, I report this as a bug.
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
More information about the erlang-bugs