char
vs string
. I've been coding in C++ maybe six years now, and almost all of the time I've been using the old char
arrays instead of string
. Partially its my inherent distrust of automatic memory management (and its effect on things like heap fragmentation), partially its my need to supervise and optimize every action the computer is taking, and maybe there's some value in limiting how much memory inputs can use and preventing denial of service attacks; but really I was just resisting change.
So I've been using strings now, and it hasn't bitten me yet, but I hit a real point of uncomfortableness this evening. I had built up some great routines for dealing with parameter lists (like param1=aaa¶m2=uuu¶m3
), but I had a form that only had one parameter. Did I really want to copy around memory and create all these complex structures just to get the value out when I could just find the '='
with strchr()
and then set the char *
to point to the next character? I finally decided, yes for a couple reasonts:
Feb '04
Oops I dropped by satellite.
New Jets create excitement in the air.
The audience is not listening.
Mar '04
Neat chemicals you don't want to mess with.
The Lack of Practise Effect
Apr '04
Scramjets take to the air
Doing dangerous things in the fire.
The Real Way to get a job
May '04
Checking out cool tools (with the kids)
A master geek (Ink Tank flashback)
How to play with your kids