Re: Style question



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
.



Relevant Pages

  • Re: Uploading a file to web server using Lisp
    ... files from a web browser to a web server using lisp? ... to do it using PHP but I could nothing for Lisp. ... (defun getfile-function (req ent posturl) ...
    (comp.lang.lisp)
  • Re: Uploading a file to web server using Lisp
    ... files from a web browser to a web server using lisp? ... to do it using PHP but I could nothing for Lisp. ... Portableaserve and Hunchentoot. ...
    (comp.lang.lisp)
  • Re: Reassessing the state of Lisp
    ... had everything else I wanted working (web server, web client, regexps, ... FFI, IDE, running on all major platforms) it occurred to me that this ... Lisp nor the OS that I was using it on. ... Thats even a complete implementation of python within Common Lisp. ...
    (comp.lang.lisp)
  • Re: Reassessing the state of Lisp
    ... had everything else I wanted working (web server, web client, regexps, ... FFI, IDE, running on all major platforms) it occurred to me that this ... Lisp nor the OS that I was using it on. ... Thats even a complete implementation of python within Common Lisp. ...
    (comp.lang.lisp)
  • Re: Uploading a file to web server using Lisp
    ... files from a web browser to a web server using lisp? ... to do it using PHP but I could nothing for Lisp. ... (defun getfile-function (req ent posturl) ...
    (comp.lang.lisp)