From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#9653: 24.0.50; `ucs-names' - Why all of the ("" . XXX) entries? Date: Tue, 04 Oct 2011 08:56:22 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1317733010 19971 80.91.229.12 (4 Oct 2011 12:56:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 Oct 2011 12:56:50 +0000 (UTC) Cc: 9653@debbugs.gnu.org To: Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 04 14:56:45 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RB4Y7-0003pf-Ie for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Oct 2011 14:56:43 +0200 Original-Received: from localhost ([::1]:38248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB4Y7-0003WS-6M for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Oct 2011 08:56:43 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB4Xz-0003QF-IQ for bug-gnu-emacs@gnu.org; Tue, 04 Oct 2011 08:56:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RB4Xy-0008O9-Kn for bug-gnu-emacs@gnu.org; Tue, 04 Oct 2011 08:56:35 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB4Xy-0008O5-FJ for bug-gnu-emacs@gnu.org; Tue, 04 Oct 2011 08:56:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RB4ZO-0005OX-Nh for bug-gnu-emacs@gnu.org; Tue, 04 Oct 2011 08:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Oct 2011 12:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9653 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9653-submit@debbugs.gnu.org id=B9653.131773307620722 (code B ref 9653); Tue, 04 Oct 2011 12:58:02 +0000 Original-Received: (at 9653) by debbugs.gnu.org; 4 Oct 2011 12:57:56 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RB4ZI-0005OB-06 for submit@debbugs.gnu.org; Tue, 04 Oct 2011 08:57:56 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RB4ZE-0005O2-Az for 9653@debbugs.gnu.org; Tue, 04 Oct 2011 08:57:54 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAE8Bi05FpZLc/2dsb2JhbABCp3iBBoFTAQEEAVYjEAs0EhQYDSSID7gIhyIEoQCERA X-IronPort-AV: E=Sophos;i="4.68,485,1312171200"; d="scan'208";a="139883040" Original-Received: from 69-165-146-220.dsl.teksavvy.com (HELO ceviche.home) ([69.165.146.220]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 04 Oct 2011 08:56:22 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 23DC0660B6; Tue, 4 Oct 2011 08:56:22 -0400 (EDT) In-Reply-To: (Kenichi Handa's message of "Tue, 04 Oct 2011 10:59:55 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 04 Oct 2011 08:58:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:52154 Archived-At: >> I'm not opposed to this change, but your answer surprises me: >> - we don't have to follow any standard. > But, it is better to follow a standard, especially an > important one as Unicode. Of course. >> - even less so when it talks about internal APIs rather than about >> externally-visible behavior. > I think that UCD is talking about external visible behaviour. If so, it doesn't apply to the behavior of (get-char-code-property CHAR 'name) which is an internal detail. >> - "null string" can mean nil just as well as it can mean "". > But, as I wrote, nil usually means > no-value/not-specified/unassigned/unknown, which is > different from the explicit "". Indeed, and that's why I prefer nil: a char's name should be pretty much unique and descriptive, so "" really isn't a char name, it just means "this char doesn't have a name" and in Elisp we usually represent this with nil. >> So was there some other motivation (e.g. simpler implementation? > No. Then please revert it to using nil. >> Simpler code somewhere else?)? > Yes, hypothetically. You can safely write, for instance, > (search-forward (get-char-code-property CHAR 'name) ...) > or > (insert (get-char-code-property CHAR 'name) ...) > without checking the return value. I doubt there will ever be code that can do the above because the "" case will need special treatment. So we end comparing things like (insert (or (get-char-code-property CHAR 'name) "")) with (insert (let ((name (get-char-code-property CHAR 'name))) (if (equal name "") "" name))) where nil is clearly a more convenient choice. >> If not (i.e. all things being equal) I'd prefer to use nil which is >> ever so slightly closer to usual Elisp practice, > Really? I've thought nil and "" are rather different object in Elisp. Of course they are, nil usually means "not found" or something like that, and I think it suits this case perfectly. Stefan