all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: emacs-devel@gnu.org
Cc: Lars Brinkhoff <lars@nocrew.org>
Subject: Re: [Emacs-diffs] scratch/record 453b0ed: Update documentation for type semantics of records.
Date: Wed, 05 Apr 2017 10:19:01 -0400	[thread overview]
Message-ID: <jwvshlnlz6j.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <20170405064706.5B4C4210A4@vcs0.savannah.gnu.org> (Lars Brinkhoff's message of "Wed,  5 Apr 2017 02:47:06 -0400 (EDT)")

> +  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



       reply	other threads:[~2017-04-05 14:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170405064705.1019.72963@vcs0.savannah.gnu.org>
     [not found] ` <20170405064706.5B4C4210A4@vcs0.savannah.gnu.org>
2017-04-05 14:19   ` Stefan Monnier [this message]
2017-04-06  7:18     ` [Emacs-diffs] scratch/record 453b0ed: Update documentation for type semantics of records Lars Brinkhoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvshlnlz6j.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=lars@nocrew.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.