On 2/19/07, Drew Adams <[EMAIL PROTECTED]> wrote:
Please explain why 1) is more readable than 2): 1) ;; Use U+2014 (EM DASH) to underline if possible, else U+002D (HYPHEN-MINUS) (if (char-displayable-p ?-) ?- ?-))) 2) (if (char-displayable-p ?\u2014) ?\u2014 ?-)))
In 1), the code is straightforward (a fact obscured in the e-mail because em dash got changed to hyphen-minus), and the comment clearly says what's happening, and even identifies *both* characters involved. In 2), \u2014 does not mean anything per se, so the user hasn't the foggiest idea why some random unicode char would be used instead of -. You'll need the same comment as before to clarify that (and, in fact, Stefan didn't remove the comment when changing the code). You can convince me that 2) will get less trouble than 1) for people with broken tools; but not that 2) is more legible. Juanma _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug