Archive - Originally posted on "The Horse's Mouth" - 2005-08-11 08:52:46 - Graham Ellis
There are some words that we use in our day to day programming life that seem a little scarey and inappropriate to their real task ... and sometimes those words worry trainees on our courses. Examples:
PHP's reset function. It's name seems to threaten to clear our data from somewhere, but all it does is reset a pointer so that following calls to iterators such as each start at the beginning.
global declarations in Tcl and PHP. They seem to imply that a variable is going to be seen everywhere; all they really mean is that a variable in the current procedure or function is shared with the main code (the code not within any procedure or function) of the current application.
And the grandaddy of them all - Unix and Linux's kill command. I'm happy to report that killing is not necessarily fatal, as all it does is send a signal to a specified process. If that process has been written in such a way that it exits, then (yes) it dies ... but if it's been written to perform in another way when it gets an external signal, that's what it does.