From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: proposal to make null string handling more emacs-y Date: Fri, 27 Apr 2012 09:29:32 +0900 Message-ID: <87vckmm2z7.fsf@catnip.gol.com> References: <83d36wfcf1.fsf@gnu.org> <834ns7g9r8.fsf@gnu.org> <87ty06nnxp.fsf@catnip.gol.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1335486594 18670 80.91.229.3 (27 Apr 2012 00:29:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 Apr 2012 00:29:54 +0000 (UTC) Cc: Eli Zaretskii , Stefan Monnier , emacs-devel@gnu.org To: Steve Yegge Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 27 02:29:53 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 1SNZ4D-0003qf-Ms for ged-emacs-devel@m.gmane.org; Fri, 27 Apr 2012 02:29:45 +0200 Original-Received: from localhost ([::1]:51844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNZ4D-0000C1-1I for ged-emacs-devel@m.gmane.org; Thu, 26 Apr 2012 20:29:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNZ4A-0000Bw-Ai for emacs-devel@gnu.org; Thu, 26 Apr 2012 20:29:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SNZ48-0002Ub-Km for emacs-devel@gnu.org; Thu, 26 Apr 2012 20:29:41 -0400 Original-Received: from smtp11.dentaku.gol.com ([203.216.5.73]:51504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNZ45-0002Oy-UR; Thu, 26 Apr 2012 20:29:38 -0400 Original-Received: from 218.231.154.2.eo.eaccess.ne.jp ([218.231.154.2] helo=catnip.gol.com) by smtp11.dentaku.gol.com with esmtpa (Dentaku) (envelope-from ) id 1SNZ41-0008GR-Nu; Fri, 27 Apr 2012 09:29:33 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id BBDF7DFC1; Fri, 27 Apr 2012 09:29:32 +0900 (JST) System-Type: x86_64-unknown-linux-gnu In-Reply-To: (Steve Yegge's message of "Thu, 26 Apr 2012 16:52:31 -0700") Original-Lines: 49 X-Virus-Scanned: ClamAV GOL (outbound) X-Abuse-Complaints: abuse@gol.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 203.216.5.73 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:150072 Archived-At: Steve Yegge writes: >> Maybe. But I think such changes must be justified on a case-by-case >> basis, with convincing use-cases ("in this very common situation, a nil >> naturally turns up where a string was expected"). > > For some of them this might be justified. For others, I see no point in > failing to deal with nil values. Signalling an error _is_ "dealing with nil values" (and very often the correct way). Anyway, I think the onus is on you to show that relaxing error-checking is justified. > There is nothing to be gained Clearly there is: less buggy code. > and the downside is that some user is sitting there unable to start > Emacs because two required packages -- packages that may be used only > on demand or not at all -- are arguing over some runtime value. > That's a big downside. WTF do you keep going on about Emacs startup? If Emacs is dealing poorly with errors during startup -- of which nil-when-a-string-was-expected is just one not particularly noteworthy example -- then Emacs' handling of errors during startup needs to be made robust. Just papering over the problem by ignoring bugs simply means Emacs will be more buggy. That hurts users. >> Type-checking catches a lot of bugs, even in "loose" languages like >> lisp and end-user-targeted languages like elisp -- and I think the >> trend is generally towards _stricter_ checking and less fuzziness, >> even in scripting languages. > > It's a big stretch to call the Emacs equivalent of a Java > NullPointerException "type checking". A very big stretch. Use whatever terminology you like. It doesn't change the issues. -miles -- Any man who is a triangle, has thee right, when in Cartesian Space, to have angles, which when summed, come to know more, nor no less, than nine score degrees, should he so wish. [TEMPLE OV THEE LEMUR]