From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: make-record Date: Sat, 23 Dec 2017 09:56:08 -0500 Message-ID: References: <20171211213729.41411-1-phst@google.com> Reply-To: rms@gnu.org NNTP-Posting-Host: blaine.gmane.org Content-Type: text/plain; charset=Utf-8 X-Trace: blaine.gmane.org 1514040913 5105 195.159.176.226 (23 Dec 2017 14:55:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 23 Dec 2017 14:55:13 +0000 (UTC) Cc: p.stephani2@gmail.com, npostavs@users.sourceforge.net, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 23 15:55:09 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 1eSlCe-0000pL-KX for ged-emacs-devel@m.gmane.org; Sat, 23 Dec 2017 15:55:08 +0100 Original-Received: from localhost ([::1]:42235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSlEb-0006ai-Ij for ged-emacs-devel@m.gmane.org; Sat, 23 Dec 2017 09:57:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSlDi-0006ZB-5G for emacs-devel@gnu.org; Sat, 23 Dec 2017 09:56:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eSlDh-0004LT-Az for emacs-devel@gnu.org; Sat, 23 Dec 2017 09:56:14 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSlDd-0004Hh-FL; Sat, 23 Dec 2017 09:56:09 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1eSlDc-0006fv-Vr; Sat, 23 Dec 2017 09:56:09 -0500 In-reply-to: (message from Stefan Monnier on Fri, 22 Dec 2017 14:39:01 -0500) 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:221376 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > Does `make-record' check that the specified record type is defined? > No, `make-record` doesn't even really know what is a type. Not checking the type name for validity is asking for trouble. Perhaps some programs make a lot of records and need the extra speed of a low-level primitive that doesn't check the validity. But surely most programs that use records won't spend much of their time creating records. In those programs, a function that does validate the type would cause no visible slowdown. So how about making 'make-record' validate the type, and having another function 'make-record-fast' which doesn't validate? I think this gets the best of both worlds. -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) Skype: No way! See https://stallman.org/skype.html.