TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: THOMAS MAEDER
from: SUNIR SHAH
date: 1997-07-22 01:11:00
subject: Sunir ventures into C++

To: Thomas Maeder
Subject: Sunir ventures into C++
 SS> void foo( int& HeyIMagicallyAlterYourVariableWithoutTellingYou )
 TM> Hey, look again! I tell you I alter your variable! I'm a reference!
Hey, look again!  The caller doesn't have a clue.
This is by far my biggest gripe with C++.  It turns it into BASIC.
 
 SS>     /* 2. Declaring data in random places */
 SS>     int HiIAmRandomlyDeclaredHere;
 TM> This feature alone makes it worth for a C  programmer  to  use  a  C++
 TM> compiler to compile his code.
I've been making heavy use of the right-click/Go to Definition feature in
VC++ lately.
 TM> If you always declare a variable where you initialize it, you'll never
 TM> forget to erase the declaration when you don't need the  variable  any
 TM> more. More, you won't read from an uninitialized variable.
Yes/no... it would be ok if everyone programmed in nice blocks.  It's not
a major issue, it's just annoying that I lose track of data.
It's because I'm still having problems coupling data with code.  To me,
they're separate things... code operates on data.  Objects are both.  Data
is not separated.
I must drill that into my head.  I must drill that into my head.
 
 SS>     HiIAmRandomlyDeclaredHere = ButICannotFindWhereHereIs; 
 TM> Of course, you lose all advantages if you do it like this. Rather
 TM> write: 
 TM> int HiIAmRandomlyDeclaredHere = ButICannotFindWhereHereIs;
Yes, but where is ButICannotFindWhereHereIs? ;)
 
 SS>     HiIAmRandomlyDeclaredHere = ButICannotFindWhereHereIs; // a=b
 SS>                                        /* 3. Assembly comments */
 TM> //  comments are quite handy, because you can easily temporarily out a
 TM> sequence of code lines containing them using /* */.
Ah, that's rare.
 
 SS>     CATCH TRY IAMAFISH THESE_ARE_ALL_VALID BECAUSEC++CHANGES EVERYWE
 TM> I like fish :-)
:-)
SS
--- Maximus 3.01
---------------
* Origin: BitByters BBS, Rockland ON, Can. (613)446-7773 v34, (1:163/215)

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™.