From: Sam S. <sd...@gn...> - 2017-08-23 20:37:21
|
> * Bruno Haible <oe...@py...t> [2017-08-23 22:09:17 +0200]: > > Sam wrote on 2017-08-02: >> In clos-method2.lisp and many other places you have this pattern: >> >> --8<---------------cut here---------------start------------->8--- >> (defmacro program-error-reporter (caller) >> `#'(lambda (form detail errorstring &rest arguments) >> (apply #'sys::lambda-list-error form detail >> "~S: ~A" ,caller (apply #'format nil errorstring arguments)))) >> --8<---------------cut here---------------end--------------->8--- >> >> Why not >> >> --8<---------------cut here---------------start------------->8--- >> (defmacro program-error-reporter (caller) >> `#'(lambda (form detail errorstring &rest arguments) >> (apply #'sys::lambda-list-error form detail >> "~S: ~?" ,caller errorstring arguments))) >> --8<---------------cut here---------------end--------------->8--- >> >> The only place where the second pattern is used is invalid-method-error >> and method-combination-error in close-methcomb2. > > I replied: >> Both are equivalent. > > Not always. When the format string contains directives that are > sensitive on the current column position (tabulate, justification, all > pretty-printing directives) or newline state (fresh-line, > elastic-newline), the two idioms may produce different results. Valid point, and, I think, an excellent argument in favor of the second version. Thanks -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net http://honestreporting.com http://mideasttruth.com MS DOS: Keyboard not found. Press F1 to continue. |