[fpc-devel] Macro Processing
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Sat May 14 14:43:21 CEST 2011
Florian Klämpfl schrieb:
> It simply shows that in a modern programming language macros has few
> real use cases because there are a lot of other constructs which serve a
> similiar purpose.
ACK
Nonetheless I wonder which efforts had to be made, to mimic only some of
the many macro usages.
While named constants deserve not much compiler code, what about:
- overloaded procedures
- inline procedures
- templates
- generics
All that could already be implemented by macros, since the invention of
C and its preprocessor. How long will we have to wait for further
replacements in Pascal?
IMO macros with arguments are not so hard to implement like
beforementioned features, require no changes to the language syntax, and
they will not slow down the compiler (if not used). Now give me any
reasonable argument, why it should not be *allowed* to extend the
compiler accordingly. The implementation can be provided by the
community, as usual.
DoDi
More information about the fpc-devel
mailing list