[fpc-devel] Macro Processing
Joerg Schuelke
joerg.schuelke at gmx.de
Mon May 16 14:53:32 CEST 2011
Am Mon, 16 May 2011 11:11:39 +0100
schrieb Martin <fpc at mfriebe.de>:
> 2) But a macro also weakens the fundamental concept of how a language
> is defined. A macro allows you do define a new syntax. To create
> something, ...
I do prefer not to make it possible to extend the language, thats why
the explicit syntax:
{$Macro mac(params)} and
{$Expand mac(params)}
I think that completely encapsulates the text manipulation from the
language level.
True, if used the readability will suffer. But at least you see
that it happens (You know there is a hidden piece of whatever, thats
not that far away from looking of a procedure call and not knowing
what that function will do. If you are interested in details, look at
the source. The same with an macro).
Regards
Jörg
More information about the fpc-devel
mailing list