unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Colorize objects by method dispatch type
Date: Fri, 03 Apr 2020 01:46:04 +0200	[thread overview]
Message-ID: <87zhbtjvsz.fsf@web.de> (raw)
In-Reply-To: <jwvmu7uoxq1.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 02 Apr 2020 08:56:23 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Also it's not clear to me exactly which part of `type-of` you don't like.

`type-of' should be ok in most cases, but I'm looking for an alternative
for cases where e.g. `type-of' just says `cons' whereby the objects are
actually very different things that are identified with a tag as first
element or so.  It's just that these are not represented with "official"
classes defined with defstruct.  If the code in question doesn't use
methods but just a `cond' to distinguish I'm lost anyway but if it uses
methods than I could use the signature of the chosen method (for a
specified generic name) for hashing, or the signature of the most
specific method implementation.  Then the color would only change if the
hierarchy of implementations changes, and in that case a changed color
would be acceptable.

Michael.



  reply	other threads:[~2020-04-02 23:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01 20:25 Colorize objects by method dispatch type Michael Heerdegen
2020-04-01 21:46 ` Michael Heerdegen
2020-04-02  3:00 ` Stefan Monnier
2020-04-02  3:45   ` Michael Heerdegen
2020-04-02 12:56     ` Stefan Monnier
2020-04-02 23:46       ` Michael Heerdegen [this message]
2020-04-03 16:01         ` Stefan Monnier
2020-04-03 23:23           ` Michael Heerdegen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87zhbtjvsz.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).