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: [Emacs-diffs] scratch/record 453b0ed: Update documentation for type semantics of records. Date: Thu, 06 Apr 2017 09:18:11 +0200 Organization: nocrew Message-ID: <86bmsa6m30.fsf@molnjunk.nocrew.org> 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 1491463145 3611 195.159.176.226 (6 Apr 2017 07:19:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 6 Apr 2017 07:19:05 +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 Thu Apr 06 09:19:02 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 1cw1h7-0000ZH-Mr for ged-emacs-devel@m.gmane.org; Thu, 06 Apr 2017 09:19:01 +0200 Original-Received: from localhost ([::1]:44158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cw1hD-0001ED-H6 for ged-emacs-devel@m.gmane.org; Thu, 06 Apr 2017 03:19:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cw1gf-0001E8-1b for emacs-devel@gnu.org; Thu, 06 Apr 2017 03:18:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cw1gZ-0005Vo-Tz for emacs-devel@gnu.org; Thu, 06 Apr 2017 03:18:33 -0400 Original-Received: from [195.159.176.226] (port=36048 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cw1gZ-0005VE-Ne for emacs-devel@gnu.org; Thu, 06 Apr 2017 03:18:27 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cw1gL-0003jU-0L for emacs-devel@gnu.org; Thu, 06 Apr 2017 09:18:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:l7s0EoSRM+6V8LZrgNmVTTUn8FM= 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:213695 Archived-At: Stefan Monnier wrote: >> + 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. Ok, I have updated the documentation. > 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`. Then I suppose this new `type descriptor' concept should be documented somewhere. I'll submit a draft. > 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`. We'd have to do that if we were to introduce `class-of'. But there doesn't seem to be a pressing need for that.