Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!think.com!zaphod.mps.ohio-state.edu!ncar!gatech!udel!haven!umbc3!gmuvax2!peraino From: peraino@gmuvax2.gmu.edu (Bob Peraino) Newsgroups: comp.sys.handhelds Subject: RE: CLEAR-TO-MARK code. Keywords: hp48 Message-ID: <3331@gmuvax2.gmu.edu> Date: 31 Jan 91 19:23:00 GMT Organization: George Mason Univ., Fairfax, Va. Lines: 37 >>> I simply cannot imagine how a program can be written to have no idea >>> what it has thrown up on the stack. > >I'm sure you can come up with such an example, but aside from that, consider >the difficulty of tracking the stack usage at all program exit points, >especially error exits. That is not difficult. > And then consider program maintainability (i.e. >changing the program). And also consider having to keep track, at runtime, >of variable size objects decomposed on the stack. I really don't understand that; if your code is logically correct, how can it have stuff just lying around on the stack, and not know why its there, or how much is there? Either the code is logically correct, or it isn't. And if its logically correct, then everything is accounted for. > Then, finally, reconsider >the clear-to-mark idea, and you will breath a sigh of relief if you had been >considering all those other hassles. > >Mark Adler >madler@pooh.caltech.edu I'm sorry, but I greatly disagree with you. It isn't a "hassle" for me to write code that works properly. Everything is on the stack for a reason, and if ANYTHING is not accounted for, then the code is flawed. I write code all the time that does nothing but stack manipulation, for speed. And when it finishes, (even recursive code) the stack is exactly the way it was, and everything was account for. (I know, I know, never end a sentence with a preposition). I don't mean to sound condescending, but if you're writing code and cannot keep track of what you're doing with the stack, then you are writing code that you yourself do not understand. peraino@gmuvax.gmu.edu