Macros are constants, or pieces of code, that are being taken care of by the compiler before the rest of the code to replace the code where the macro is used with the content of the macro.
There are three different types of macros: stand alone macros, local macros, and macro libraries.
Macros are typically constant values that are only changed by developers. They are used so that developers don't have to hardcode these kind of values in the X++ code, but rather refer to the macro.
Today I had a requirement to only show the following language across the whole application:
en-us
fr
it
At first I thought to create a custom lookup method as I did for another requirement last month (http://axwonders.blogspot.com/2011/03/filter-activity-form-contact-to-only.html), but then I thought .. Oh my .. this would mean to add a lookup method to several forms across the application, and what about if I need to change something in the future? It was a fact that the scalability of this change will be an issue.
Because the requirement said "Across the application" I decided to modify the LanguageTable form to be shown as a lookup in every instance of the LanguageID across the application.