home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / scheme / 2119 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  3.3 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!gatech!rutgers!micro-heart-of-gold.mit.edu!bloom-beacon!INTERNET!dont-send-mail-to-path-lines
  2. From: jeff@aiai.edinburgh.ac.UK (Jeff Dalton)
  3. Newsgroups: comp.lang.scheme
  4. Subject: Re: wots going on here!?
  5. Message-ID: <1187.9208311520@subnode.aiai.ed.ac.uk>
  6. Date: 31 Aug 92 15:20:02 GMT
  7. Sender: daemon@athena.mit.edu (Mr Background)
  8. Organization: The Internet
  9. Lines: 73
  10.  
  11. > Date: 30 Aug 92 04:28:33 GMT
  12. > From: Brian Harvey <bh@anarres.cs.berkeley.edu>
  13.  
  14. > The behavior I want would be *less* verbose:
  15. >         > (+ 2 a)
  16. >         Unbound variable: a
  17. >         >
  18. > Short and sweet.  It should be possible for an advanced user to ask
  19. > for pause-on-error behavior in which Scheme would attempt to preserve
  20. > the environment in which the error occurred, but you should have to
  21. > ask for it.  (This is how Logo does things.
  22.  
  23. I would find it completely unacceptable.  Reasons: 1. I often have
  24. more than one variable with the same name and so I need to know what
  25. function it is in, at least.  2. I may not want to give up the whole
  26. computation just because of an error.  3. I may want to look around
  27. a bit to find out more about the error.
  28.  
  29. However, I think it's important for the break look (debugger) to be
  30. as much like the top level as possible.  In particular, it should
  31. work to type expressions in the usual way.  Popping back one level
  32. should be easy, such as typing a single character.
  33.  
  34. I can see how beginners might find it confusing (or something)
  35. to have to type a character that gets them back to the top level,
  36. but it's not hard to get used to it.
  37.  
  38. But if you want it to work the other way, it's easy to get an
  39. Emacs mode such as ILisp to always send the "pop" command for
  40. you when an error occurs.
  41.  
  42. > Date: 30 Aug 92 14:23:23 GMT
  43. > From: "Guillermo J. Rozas" <jinx@zurich.ai.mit.edu>
  44.  
  45. > I'm sorry, but I disagree strongly with this view of the world.
  46. > It is very close to the C/Unix printing "segmentation violation (core
  47. > dumped)" and giving you back a shell prompt.
  48.  
  49. Not quite that bad, since you get the variable name and since starting
  50. up again is (usually) simpler and faster than "recompile and run it
  51. under the debugger".
  52.  
  53. > Date: Sun, 30 Aug 1992 18:25:48 GMT
  54. > From: Matt Wright <matt@volga.berkeley.edu>
  55.  
  56. > >I'm sorry, but I disagree strongly with this view of the world.
  57. > >It is very close to the C/Unix printing "segmentation violation (core
  58. > >dumped)" and giving you back a shell prompt.
  59. > >
  60. > >Your answer of having to tweak a flag or whatever is analogous to
  61. > >saying "recompile and run it under the debugger".
  62. > I disagree.  You way is analogous to having it be so that typing "mial"
  63. > instead of "mail" opens up a new shell with a fresh set of environment
  64. > variables and puts you into the debugger, instead of printing an error
  65. > message and giving you another prompt.
  66.  
  67. No it's not.  Look, these things happen to me, and to lots of other
  68. people reading this newsgroup.  If being able to do some debugging
  69. after an "undefined variable" error really was that much like entering
  70. a new shell after mistyping a command, do you think we'd be incapable of
  71. seeing that it was the same?  
  72.  
  73. The only time it's the same is when the undefined variable is in
  74. the expression you just typed to Scheme.
  75.  
  76. Now, if you said that Scheme ought to avoid entering a debug loop
  77. in that case, I might agree with you.
  78.  
  79. -- jd
  80.