From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Should records be able to mimic primitive types? Date: Mon, 12 Jun 2017 20:22:43 +0300 Message-ID: <83o9tt3yu4.fsf@gnu.org> References: <8777899d-ca8e-212c-b8bf-2f8da4c54836@cs.ucla.edu> <83zidg57xv.fsf@gnu.org> <83tw3l3zv4.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1497288187 12932 195.159.176.226 (12 Jun 2017 17:23:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Jun 2017 17:23:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 12 19:23:04 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKT3O-00038g-0s for ged-emacs-devel@m.gmane.org; Mon, 12 Jun 2017 19:23:02 +0200 Original-Received: from localhost ([::1]:39300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKT3T-00043g-5W for ged-emacs-devel@m.gmane.org; Mon, 12 Jun 2017 13:23:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKT3N-00043Z-Km for emacs-devel@gnu.org; Mon, 12 Jun 2017 13:23:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKT3J-000263-Oc for emacs-devel@gnu.org; Mon, 12 Jun 2017 13:23:01 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKT3J-00025q-LR; Mon, 12 Jun 2017 13:22:57 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3596 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dKT3I-0004bd-Ck; Mon, 12 Jun 2017 13:22:57 -0400 In-reply-to: (message from Stefan Monnier on Mon, 12 Jun 2017 13:15:35 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:215596 Archived-At: > From: Stefan Monnier > Date: Mon, 12 Jun 2017 13:15:35 -0400 > > > If some usage is unequivocally wrong, can never support legitimate use > > cases, and the defenses are not too expensive, then I think this could > > be okay. But we need to be careful not to disallow legitimate, though > > perhaps somewhat dangerous practices. Emacs's tradition is to trust > > the Lisp programmers not to shoot themselves in the foot, so we > > generally prefer to err on that side of the line, when in doubt. > > Punishing the innocent on behalf of possibly guilty is something I > > think we should try to avoid. > > I think the kind of added checks he's thinking of are "safe" in > this respect. > > The reason why I disagree with them is because they are too costly > compared to the likelihood they'll ever help catch a bug That'd be in the "defenses are too expensive" department, right? > We generally don't check every imaginable meaningless circumstance, but > only those that we've found to occur often enough to warrant the runtime > and maintenance cost of an extra test. Right.