From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Should undefined behavior be encouraged in Emacs? Date: Mon, 03 Oct 2011 18:27:16 +0200 Message-ID: References: <4E89124D.8070405@cs.ucla.edu> <83ipo6rr1y.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1317659253 13134 80.91.229.12 (3 Oct 2011 16:27:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Oct 2011 16:27:33 +0000 (UTC) Cc: eggert@cs.ucla.edu, rms@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 03 18:27:29 2011 Return-path: Envelope-to: ged-emacs-devel@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 1RAlMW-0006i2-Lt for ged-emacs-devel@m.gmane.org; Mon, 03 Oct 2011 18:27:28 +0200 Original-Received: from localhost ([::1]:38152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAlMV-0003k8-B3 for ged-emacs-devel@m.gmane.org; Mon, 03 Oct 2011 12:27:27 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAlMS-0003jy-8q for emacs-devel@gnu.org; Mon, 03 Oct 2011 12:27:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAlMR-0001MY-Ex for emacs-devel@gnu.org; Mon, 03 Oct 2011 12:27:24 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.9]:60229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAlMP-0001M3-IU; Mon, 03 Oct 2011 12:27:21 -0400 Original-Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 0D50C1C1DA16; Mon, 3 Oct 2011 18:27:17 +0200 (CEST) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id E5E411C00181; Mon, 3 Oct 2011 18:27:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id mODbLnquH1Z8; Mon, 3 Oct 2011 18:27:17 +0200 (CEST) Original-Received: from igel.home (ppp-88-217-109-123.dynamic.mnet-online.de [88.217.109.123]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 3 Oct 2011 18:27:17 +0200 (CEST) Original-Received: by igel.home (Postfix, from userid 501) id EA49FCA29C; Mon, 3 Oct 2011 18:27:16 +0200 (CEST) X-Yow: I'LL get it!! It's probably a FEW of my ITALIAN GIRL-FRIENDS!! In-Reply-To: <83ipo6rr1y.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 03 Oct 2011 18:14:01 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 212.18.0.9 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:144547 Archived-At: Eli Zaretskii writes: > I consider referencing buffer position of zero similar to indexing an > array out of its bounds. Unlike C, Emacs Lisp is supposed to check each and every lisp data. The interpreter may reject an out-of-bounds or wrong-type value by raising an error, or silently accept it by coercing it into bounds, but it should never crash because of it. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."