home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.scheme
- Path: sparky!uunet!ukma!usenet.ins.cwru.edu!agate!ames!pasteur!volga.Berkeley.EDU!matt
- From: matt@volga.Berkeley.EDU (Matt Wright)
- Subject: Re: wots going on here!?
- Message-ID: <1992Aug30.182548.13079@pasteur.Berkeley.EDU>
- Sender: nntp@pasteur.Berkeley.EDU (NNTP Poster)
- Nntp-Posting-Host: volga
- Organization: University of California, at Berkeley
- References: <JINX.92Aug29223329@chamarti.ai.mit.edu> <17piphINNncj@agate.berkeley.edu> <JINX.92Aug30102323@chamarti.ai.mit.edu>
- Date: Sun, 30 Aug 1992 18:25:48 GMT
- Lines: 46
-
- In article <JINX.92Aug30102323@chamarti.ai.mit.edu> jinx@zurich.ai.mit.edu writes:
- >In article <17piphINNncj@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU (Brian Harvey) writes:
- >
- > [Don't put me in the debugger or a special environment on error unless
- > I ask for it.]
- >
- >I'm sorry, but I disagree strongly with this view of the world.
- >It is very close to the C/Unix printing "segmentation violation (core
- >dumped)" and giving you back a shell prompt.
- >
- >Your answer of having to tweak a flag or whatever is analogous to
- >saying "recompile and run it under the debugger".
-
- I disagree. You way is analogous to having it be so that typing "mial"
- instead of "mail" opens up a new shell with a fresh set of environment
- variables and puts you into the debugger, instead of printing an error
- message and giving you another prompt.
-
- Simple, stupid typing mistakes account for 90% of the errors I generate;
- most of the rest come from stupid stuff like forgetting the order of
- arguments to a function. If I'm really looking hard and trying to find an
- elusive bug, I'll be more careful and turn on the debugger.
-
- >Please remember that there are programs that modify global state,
-
- Not until chapter 3... :-)
-
- >and thus re-running is not an option since they may not fail in the same
- >way or at all.
-
- Yes, that it a problem. But this is the kind of situation where you'll be
- more careful and possibly turn on the debugger. In my experience, when I
- debug some non-functional program, I end up writing a "reset" procedure that
- gets all my state information set up correctly; I run that before testing my
- real program.
-
- Besides, what we're talking about is making life easier for beginning users,
- who tend not to modify global (or local) state anyway.
-
- But I agree that's it's a tradeoff. I *have* been in the situation where I
- generated an error and wished I could get back to that context, but I got
- thrown back to top-level. Somebody should write a DWIM debugger that
- heuristically determines if your error is "interesting"... :-)
-
- -Matt
-
-