Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro Substitution - Epilogue
Message
De
30/12/2002 14:52:04
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Macro Substitution - Epilogue
Divers
Thread ID:
00736706
Message ID:
00736706
Vues:
63
There has recently been a discussion about the use of macro substitution versus the use of EVALUATE() and/or Name Expressions. See Thread #735756. Here’s an epilogue of that discussion. Let it be clear that this epilogue is not meant to restart the discussion. Improvements to my use of English are appreciated, however.

Everybody who joined the thread claimed that there are situations where only macro substitution is applicable. Different points of view arised with regard to situations where other techniques are available, especcially EVALUATE() and/or Name Expressions.
Some stated that macro substitution should be avoided whenever other techniques can be used. Main arguments were that macro substitution is slower, harder to read and more difficult to maintain.

However, it was argued by others that there are many cases where these premises are inadequate and even counter productive. It was shown that on occasion macro substitution is superior to the other techniques. It may be the faster technique, readability isn’t an issue for many developers and there was no proof given of maintenance problems.

A list of four arguments can be used to decide where and when to use macro substitution.

1)
Macros are the only way to parametrize a keyword in a command.

2)
Name expressions are the best way to parametrize a name requirement in a command. Macros are only the second to best way for this.

3)
When used as argument in a loop construction (like a DO WHILE and a SQL-query), there's a fundamental difference in the way that a macro and an EVALUATE() are handled. The functional requirement is therefore decisive.

4)
EVALUATE() is not Rushmore optimizable, whereas the use of a macro leaves that possibility intact.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform