TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: DARIN MCBRIDE
from: ASHER DENSMORE-LYNN
date: 1997-07-26 10:06:00
subject: Sunir ventures into C++

25 Jul 97 18:36, Darin Mcbride wrote to Asher Densmore-Lynn:
 DM> Yech.  No, this feature was added exactly FOR readability.  By placing
 DM> variables close to code, it makes both easier to understand.  The
 DM> human mind can only keep track of 7 +/- 2 things at a time.  By
 DM> putting all 537 variables at the top of your function, you make it
 DM> hard to follow.  However, by putting the variables close to where
 DM> they're used, the reader is more likely to be able to understand what
 DM> a variable's job is because there is less to remember at a time.
Excuse me, but the human mind can only keep track of 7 +/- 2 things at a 
time. What the heck are -you- doing with a function with 537 variables?!
(537 -constants- are another story -- those are -supposed- to be forgettable, 
like math constants. But if you're using 537 variables, it's time to quit 
using BASIC. d: (: Ideally, no function should -need- more than ten to 
fifteen variables or so -- if it requires greater complexity, break -that- 
down into functions, and then inline them if you must.)
(Remember I said 'ideally' -- and that there are exceptions, and good ones. 
No need to post 2E8 optimized functions with 11 vars...)
 AD>> Think your functions through before you set hand to keyboard --
 AD>> you really should know the vars you'll need before you do
 AD>> anything more than prototype it.
 DM> Except when debugging...
I generally debug -after- I prototype, myself. If you're that good, I know a 
couple of local companies that'd -love- to have you. d: (:
Asher Densmore-Lynn 
... Doing it the hard way is always easier.
--- Squish v1.11
---------------
* Origin: Phaenix Rampant, 'Uhm... I hit it again!' (1:130/115)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.