From: Sam S. <sd...@gn...> - 2004-07-22 21:15:13
|
> * Bruno Haible <oe...@py...t> [2004-07-22 22:51:28 +0200]: > >> > Thinner type checks: use error instead of assert. >> >> this makes error recovery harder. >> why? > > assert was taking more than 100 bytes of bytecode in _each_ slot accessor > method. Just wasted space. > > I don't think error recovery at the lowest level is important. Example: > > (defun matrix-multiply (x y) > (with-slots (x11 x12 x21 x22) x .....)) > > If the users passes a wrong object instead of a matrix, will he want > to acknowledge 4 errors, and continue from each of them by passing a > replacement object? No, he will want to replace the 'x' just once and > then 'redo' the matrix-multiply invocation stack frame. the first assert should affect all: the replacement value should propagate. maybe WITH-SLOTS should push the check to the beginning and then use accessors with check stripped. > So I consider it much more important to work on a general 'redo'/'return' > facility than on low-level continue everywhere. > For example using your approach from 2004-04-21. are you working on that? -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.honestreporting.com> There is an exception to every rule, including this one. |