From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Brinkhoff Newsgroups: gmane.emacs.devel Subject: Re: User-defined record types Date: Fri, 17 Mar 2017 21:45:50 +0100 Organization: nocrew Message-ID: <86mvcjvdhd.fsf@molnjunk.nocrew.org> References: <87pokampa4.fsf@ericabrahamsen.net> <878tp0i74g.fsf@users.sourceforge.net> <87efyg6y0i.fsf_-_@drachen> <87zigwz9wx.fsf@tromey.com> <86bmtbd45s.fsf@molnjunk.nocrew.org> <86bmt42nk2.fsf_-_@molnjunk.nocrew.org> <86o9x40z35.fsf@molnjunk.nocrew.org> <86k27s0w6m.fsf@molnjunk.nocrew.org> <86fuif22o6.fsf@molnjunk.nocrew.org> <86a88mz9tx.fsf@molnjunk.nocrew.org> <864lytvviq.fsf@molnjunk.nocrew.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489783591 1451 195.159.176.226 (17 Mar 2017 20:46:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Mar 2017 20:46:31 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 17 21:46:26 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 1coylP-0007eE-3W for ged-emacs-devel@m.gmane.org; Fri, 17 Mar 2017 21:46:19 +0100 Original-Received: from localhost ([::1]:50702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coylV-00081n-5v for ged-emacs-devel@m.gmane.org; Fri, 17 Mar 2017 16:46:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coylO-00081V-QQ for emacs-devel@gnu.org; Fri, 17 Mar 2017 16:46:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1coylK-0007IN-UC for emacs-devel@gnu.org; Fri, 17 Mar 2017 16:46:18 -0400 Original-Received: from [195.159.176.226] (port=56836 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1coylK-0007HB-Lo for emacs-devel@gnu.org; Fri, 17 Mar 2017 16:46:14 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1coykw-0004nW-U0 for emacs-devel@gnu.org; Fri, 17 Mar 2017 21:45:50 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 10 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:1c6otvXh0m+ApvtJpY2AUfl34SI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:213098 Archived-At: Stefan Monnier wrote: >> What if we relax the type check to use (aref object 0) instead? > > One option could be to change `type-of' so as to know about the old > struct format, and to make this backward compatibility hack dependent > on a boolean var which defaults to nil but would be set to t as soon > as we detect the use of an old-style struct. I have now implemented that in the latest commit to the scratch/record branch.