From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Colorize objects by method dispatch type Date: Fri, 03 Apr 2020 01:46:04 +0200 Message-ID: <87zhbtjvsz.fsf@web.de> References: <87zhbv6jiu.fsf@web.de> <87r1x65z5v.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="91646"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 03 01:48:20 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jK9ZM-000Njx-8W for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 03 Apr 2020 01:48:20 +0200 Original-Received: from localhost ([::1]:48514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK9ZL-0006mq-32 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 02 Apr 2020 19:48:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44517) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK9XH-0006lG-O9 for help-gnu-emacs@gnu.org; Thu, 02 Apr 2020 19:46:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jK9XF-0007TO-NI for help-gnu-emacs@gnu.org; Thu, 02 Apr 2020 19:46:10 -0400 Original-Received: from mout.web.de ([212.227.15.4]:41071) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jK9XF-0007RT-An for help-gnu-emacs@gnu.org; Thu, 02 Apr 2020 19:46:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1585871164; bh=SMp4/INdAaNheu68prES2QkB7GoK49rDngjkqJoYUd0=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=YCmqLG/j/UNqXoLK7WpVHXtZM23QpJwDGsvhC1NM+ITUH+x8821ZnbigsgBdQePi6 TjyBojJqd4pPTA+jeSKgHGgO1RAlAlzbIqWbc1eBRiLaRBeTNMLlVYXcjCUmigvLvc NSmNuaWW92f2toE4QTgQkLmV3F9/ZBVQVv2WYxHA= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([188.98.99.7]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lp7Lg-1ioNc827hU-00eqXM; Fri, 03 Apr 2020 01:46:04 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 02 Apr 2020 08:56:23 -0400") X-Provags-ID: V03:K1:V/ui2u+RBtRKBxd6K5z1Aqzq22VnNSXgOfrDZ8asbCNMmP7QNnh EN3nKwPANxV1qh3PcSBr+X9AnyIvXeVn4xvDuobSerLK4ql6NjuzEkeGJb+eKFscE3E2dl2 6gOFhX+I8DHjAnCMi1YryW616QY/ey2CvfL/bK6L02twe5G/x38E7PRhAXwuSehfTv6OU8s wjyypDHhoZPdMSnEE7hIQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:UhUBQfMC0hg=:e5H+iISDMv1wK5HVFfBb5m wXlpM2hHbXzscUvSyOFkBxk0upnPzTpVAFaiLY3e1BTfWrXiRPVY1MZEjodmyBffef9IBMC+n WNJAum33qUwAjMJCM1ApPp8nkN8VOwARm1a4V2/u50wKH47xvqN7xk87rOgK0wqN+qFiSNrUd bXrEC0H86YUd+wNkPcUdoakKnWVZNtAjBCbrvvF4uHqOorkG81wzKRnCRd3dsDJqiW+ayauI1 qP2eC4WaV5d6m5974BD/sFVF8sYzJVSDCaYjSBZJ1SmyzxT90jxjritvbG7a7yXWTfRPj+H2T xuoqvy3M+BR2RZY5+C9p69rtxjxrsSQg9EQqxByROpiEiNA75+7Djx+3S7FHCOUoEbsltIjCJ 01tlzFCXv3ZzWZoVfpGFzANqgl0WThCEs3GIoLn9emTHk0DhJpmwTEWiKpzOQ6AK5hQBvqho9 LaMm5L5jjZ90NDBhvLzWo3dTxtxqAqUC8n/z3XYmC0kI+Bm5aKvmMg44YlvEzimOqnzhEeRZd 05yeupGf4kcGx/B+Eb6VD+U+HAlaS/Tq4p3XUel0YI5TFV2dR/y4Tk/2XxYsFmQlu1x2WooqS OEm2u0rkjTPCaZV3pQWbfs/t9aRMVxcY7w//cOfatjUeJPU9/fiAjuQ/gvl6x9YzTOXlmTHJ8 F9wSo4DFQDViZh7Az6CXhdOqa17L6OTFPJsnD01Kh9lObQCPp/7cLqMI3sR0vn5mQXI0DIhN6 fimJCkuBENDlSCmGSvfBtiIq7+lsugJIJIesZYPBq0wVf33w8UAb9apqU3gPqaP6MY3mZ/3H X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.4 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:122739 Archived-At: Stefan Monnier 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.