From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] scratch/record 453b0ed: Update documentation for type semantics of records. Date: Wed, 05 Apr 2017 10:19:01 -0400 Message-ID: References: <20170405064705.1019.72963@vcs0.savannah.gnu.org> <20170405064706.5B4C4210A4@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1491401975 29964 195.159.176.226 (5 Apr 2017 14:19:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Apr 2017 14:19:35 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Lars Brinkhoff To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 05 16:19:28 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 1cvlmM-0006Ro-Mg for ged-emacs-devel@m.gmane.org; Wed, 05 Apr 2017 16:19:22 +0200 Original-Received: from localhost ([::1]:40750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvlmS-0001MV-NL for ged-emacs-devel@m.gmane.org; Wed, 05 Apr 2017 10:19:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvlm8-0001FD-VN for emacs-devel@gnu.org; Wed, 05 Apr 2017 10:19:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvlm3-0008Ec-DL for emacs-devel@gnu.org; Wed, 05 Apr 2017 10:19:08 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:37914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvlm3-0008EN-8h for emacs-devel@gnu.org; Wed, 05 Apr 2017 10:19:03 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v35EJ2i1007630; Wed, 5 Apr 2017 10:19:02 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 021E6603E7; Wed, 5 Apr 2017 10:19:01 -0400 (EDT) In-Reply-To: <20170405064706.5B4C4210A4@vcs0.savannah.gnu.org> (Lars Brinkhoff's message of "Wed, 5 Apr 2017 02:47:06 -0400 (EDT)") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV5990=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5990> : inlines <5781> : streams <1740058> : uri <2404289> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:213675 Archived-At: > + The type slot should be a symbol or a record. If it's a record, > +@code{type-of} assumes it's an EIEIO (@pxref{Top,,,eieio,EIEIO}) type > +descriptor and returns the contents of slot 1. Any other kind of > +object is returned as-is. Actually, it just assumes that the type name name is in field 1, which without any reference to EIEIO. The assumption is that we can arrange for any kind of type descriptor to put a name in there. E.g. it's true for `eieio--class`, `cl-structure-class` as well as their shared parent `cl--class`. And we could arrange for it to also be true of a type descriptor for, say, the `integer` type, if we ever decide to introduce a type descriptor for primitive types like `integer`. Stefan