Re: Style question
- From: Wade Humeniuk <whumeniu+anti+spam@xxxxxxxxx>
- Date: Sun, 04 Dec 2005 16:37:20 GMT
micromoog wrote:
Wade Humeniuk wrote:
[snip code using the condition system and error handling]
Some of this is well over my head at this point, but I'm planning to save this thread anyway for review later. Thanks for the suggestions!
Your welcome. One of the defining things about (at least Common) Lisp is that programs do not crash in the way many other programs do. If a Common Lisp core dumps its because of a fault in the implementation or maybe a problem with program's Foreign Function logic. As a Lisp coder you can put "protection" around large blocks of code (ie HANDLER-CASE). This has the effect of allowing one to abort gracefully (hopefully logging the problem). A really good example of using this is with a CL web server. If the web server encounters (even an unintentional) error, it can be caught and something can be returned to the web client. This error handling is free and easy in Lisp. For your example there are all sorts of errors that can happen with the guesser's interaction. Determining what all the possible errors in the GUESS program could be indeterminate, putting a general error handler around it is easier, and just as safe.
Wade .
- References:
- Style question
- From: micromoog
- Re: Style question
- From: Wade Humeniuk
- Re: Style question
- From: Wade Humeniuk
- Re: Style question
- From: micromoog
- Style question
- Prev by Date: Re: Is Lisp ready to become popular?
- Next by Date: CLX help
- Previous by thread: Re: Style question
- Next by thread: defmethod print-object
- Index(es):
Relevant Pages
|