11
votes
Vote UpVote

Limiting Scope

Nick Hodges – As a general rule, developers should limit the scope of variables as much as possible.   Keeping the notion of limiting scope in every way possible, from the big things (never, ever, ever use global variables)to the subtle little things a language can do (declare const parameters whenever possible) all can contribute to clean, easy to test code.  Limiting scope has all kind of benefits.  First, limiting scope of a variable reduces the number of places that a given variable can be modified.  The reason we rightfully abhor global variables is there is no telling where ...
Favorite? Off-Topic? nick@nickhodges.com @ 2011-09-10 07:02

Statistics

Visits: 947
Votes: 11
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Ericc
Jørn E. Angeltveit
ket555
Ph. B.
Robert Love
Rodrigo
SimaWB
stukelly
vcldeveloper
Wouter
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)