[erlang-questions] ?DATE and ?TIME MACROs

Richard O'Keefe ok@REDACTED
Thu Oct 9 03:33:42 CEST 2008

On 7 Oct 2008, at 10:35 pm, Mats Cronqvist wrote:
> -define(DATE,proplists:get_value(time,?MODULE:module_info(compile))).

Just in case it's not obvious, it may be worth pointing out
the ?DATE and ?TIME implemented this way, and the ?FUNCTION macro
that has previously been posted,
  - do not give you ground terms,
    so the new-in-R12 optimisation of storing ground terms
    once won't happen
  - are not usable in patterns.

The second of these may not matter to many people,
but the first is at least potentially a space issue for
people wanting to use such macros heavily in logging/debugging

More information about the erlang-questions mailing list