From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: proposal to make null string handling more emacs-y Date: Wed, 25 Apr 2012 10:28:05 -0400 Message-ID: References: <83d36wfcf1.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1335373769 12124 80.91.229.3 (25 Apr 2012 17:09:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Apr 2012 17:09:29 +0000 (UTC) Cc: Steve Yegge , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 25 19:09:27 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SN5iY-0008Ua-C2 for ged-emacs-devel@m.gmane.org; Wed, 25 Apr 2012 19:09:26 +0200 Original-Received: from localhost ([::1]:54827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SN3Cw-0004y1-HA for ged-emacs-devel@m.gmane.org; Wed, 25 Apr 2012 10:28:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SN3Cc-0004GD-B3 for emacs-devel@gnu.org; Wed, 25 Apr 2012 10:28:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SN3CW-0006Ko-Ms for emacs-devel@gnu.org; Wed, 25 Apr 2012 10:28:17 -0400 Original-Received: from ironport-out.teksavvy.com ([206.248.143.162]:36713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SN3CT-0006J4-9K; Wed, 25 Apr 2012 10:28:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApYIACxOgk/O+LN8/2dsb2JhbABDuCMDgQyBCIIJAQEEAVYjBQsLNBIUGA0kiBwFtjKLYYR5BKRFgV2DAw X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="176621768" Original-Received: from 206-248-179-124.dsl.teksavvy.com (HELO pastel.home) ([206.248.179.124]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 Apr 2012 10:28:06 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 59C3A58FE4; Wed, 25 Apr 2012 10:28:05 -0400 (EDT) In-Reply-To: <83d36wfcf1.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Apr 2012 11:22:58 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.143.162 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150016 Archived-At: >> I think we should change all the core string-manipulation functions to deal >> gracefully with nil arguments. Specifically, I want to change the smallest >> set of functions that may originate the infamous "wrong-type-argument >> (stringp, nil)" error, making them instead treat nil as if it were the >> empty string. Being a type zealot, I'm not sure I like this idea. This said, I'm not necessarily opposed to it. The argument that it's a super-common error and that it's always hard to debug doesn't convince me (I haven't noticed it to be significantly more frequent than other errors, nor that it's hard to debug). BTW, we shouldn't accept "hard to debug" as a fatality: we should try to make it easier. So I'd like to see an actual proposed patch for one, and some further arguments about why it would be a goo idea. > I'm quite sure this will break gobs of existing code in Emacs. The > entire display engine, for starters. I wonder what makes you think that would introduce lots of bugs, and why in the display engine. AFAICT this error is very rarely thrown, so turning it into some other behavior should have very little effect, if any. Stefan