Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Equivalent to eval()
Message
De
29/03/2010 01:46:27
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
28/03/2010 22:26:33
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01457734
Message ID:
01457775
Vues:
67
This approach of evaluating things is to be avoided as much as possible. This is something I learned when moving into this new environment. We got used to that in VFP but, since the first day, I believe it is something that shouldn't have been part of the product.

Interesting. Why do you say that? Sure there are other ways to achieve most things, but reflection isn't so difficult, is it?

FWIW, the "performance hit" from macro substitution/eval() in VFP is very small once the parser is loaded. I've been doing some work looking at _execute in VFP: the only difference is that key words in the evaluated string get tokenized which is remarkably quick for most evals. But you can speed up dense data work in VFP by tinkering with its variable pointers as a strongly typed language would do. More on that later...
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform