[erlang-questions] Getting rid of the preprocessor

Vlad Dumitrescu vladdu55@REDACTED
Fri May 25 13:03:23 CEST 2012


On Fri, May 25, 2012 at 9:12 AM, Vlad Dumitrescu <vladdu55@REDACTED> wrote:
> My real question got buried in the discussion about my particular use
> case: previously when the preprocessor and its demise were discussed,
> one main reason for not being able to do anything about it at the
> moment was that first we need to do something about the records. But
> the preprocessor doesn't do anything to records, they are processed by
> the compiler. To quote you from a recent thread: "Abstract patterns
> and frames are all part of a long-time project to make the
> preprocessor unnecessary". Could you please enlighten me as to how the
> preprocessor is involved here?

I think I can answer that myself now: the preprocessor is needed
because most of the times the record definitions are in hrl files,
that are included in the module source. I don't see any other reasons,
are there any?

I missed that because including files and ifdef-ing sections of code
aren't problems for me and are useful, so I kind of automatically
assumed that a restricted preprocessor that performs these tasks will
still be available. The predefined macros should probably be handled
by the preprocessor too.

best regards,
Vlad



More information about the erlang-questions mailing list