Does Ada have macros?
No, neither Ada 83 nor Ada 95 do. There was a Steelman requirement that the language developed NOT have a macro capability. This was a well thought-out requirement. What you see in a piece of Ada code is what you get (within a debugger for example). This does not hold true for macro languages. General text-substitution macros like those in the C preprocessor are thought to be too unsafe. For example, a macro can refer to a variable X and depending where the macro is expanded X may or may not be visible. Ada programs are supposed to be readable and in many cases C macros are the main culprits in producing unreadable C programs. Compile time macro facilities tend to be dreadfully over- and misused, resulting in horrible maintenance problems. Furthermore, there is a tendency to use macros to patch up glaring omissions in the language. For example, C has no named constants, a very bad omission, but #define is used to patch over this gap. In C, three “legitimate” uses of macros are for defi