On Sunday, June 15, 2003, at 06:26 pm, Daniel Carrera wrote: > On Mon, Jun 16, 2003 at 02:20:24AM +0900, Kent R. Spillner wrote: >> Pretend you're using a statically typed language. Now re-evaluate hn. >> >> Not that I'm defending the notation. =) But when you're buried >> knee-deep in legacy C-code, would you rather be able to tell at a >> glance >> that a variable is a pointer to an array of characters, or have to >> jump >> around through the source and then back? > > A better solution would be to avoid global variables, to avoid jumping > around, and create appropriate accessor functions. You're putting the horse before the cart here - that phrase "legacy C code" should strike fear into your heart, because things like "accessor functions" were either unheard of, or considered a waste of precious instructions. In environments where you specifically order your if/else clauses for efficiency, making an accessor for an otherwise global variable is an undreamt-of luxury. In short, readability was not a priority. In that situation, hn was a costless improvement to code readability. So whither then, OO? The code that resulted from the previous attitude was the major factor in promoting OO in industry, not because it's inherently better, but because OO allows sort of a continuous spaghetti effect of replacing legacy code. The new code doesn't even have to be better (or even really "new" apart from the interface), because its deleterious effects are better contained. This lets unexperienced people (of which there are many many more than very experienced people) maintain and update software that would otherwise be too complicated. I know it's not what's in the OO marketing brochures, it's just what it looked like from my perspective. matt smillie.