[fpc-devel] Macro Processing

Joerg Schuelke joerg.schuelke at gmx.de
Fri May 13 13:22:28 CEST 2011

Am Fri, 13 May 2011 11:25:36 +0200 (CEST)
schrieb Michael Van Canneyt <michael at freepascal.org>:

> In short: No, it is better to keep that particular box of pandora
> closed.
> None of the more "modern" languages implement macros, and this is for
> good reason.
> Pascal has always existed without macros. It keeps code readable:
> what you read is what you get.
> This is a strength of the language, and should remain that way.

Yes I can live without macros too, i do it for years.

FPC has macros today, and the one of the bad way, which you do not see
in the source!! And the scanner is today checking every identifier for
macro expansion, if you switch {$MACRO ON}.

Try to remove the macro support from the compiler and we will see,
there are people around, which use them, even the ones without

The way I suggest for macro parameters make them better:
	{$I %name(some text)}	makes it clear, thats a macro
expansion. In respect of readability, where is the difference to:
	name(param1,param2)	in pascal, where you do know
it is a function call. Thats the same.

More information about the fpc-devel mailing list