Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Short-Circuiting with Logical Operators
Message
De
29/10/2014 15:48:33
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
29/10/2014 15:21:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01609995
Message ID:
01610151
Vues:
31
>Many years ago I read some articles in Byte mag or DDJ or some such, about the tricks C/C++ optimizing compilers employ. Coupling that with the knowledge that not all languages short-circuit the same way (or at all) I made the decision that I would never rely on it regardless of language. From a maintenance POV I consider code that uses it fragile and a land mine for the unwary or unfamiliar. Relying on that behaviour is not inherently self-documenting in the way that (ideally) good code should be.

In such unreliable languages, where the compiler may make its own decisions, I'd code very conservatively and avoid any features I'm not sure of.

In VFP, I run only the risk of it being broken in the next version... what the hell, you live only once (yes, YLOO and not YOLO, because the latter is completely wrong - there are dozens of other things you also do once).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform