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

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to