From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#8415: 23.3.50; Extensible Emacs Registers Date: Mon, 04 Apr 2011 21:41:30 -0400 Message-ID: References: <4D9A45CD.4030808@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1301969260 393 80.91.229.12 (5 Apr 2011 02:07:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 5 Apr 2011 02:07:40 +0000 (UTC) Cc: Davis Herring , 8415@debbugs.gnu.org, Leo To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 05 04:07:31 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q6vfz-0006YE-QX for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Apr 2011 04:07:28 +0200 Original-Received: from localhost ([127.0.0.1]:56940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6vfy-0005rF-Ni for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Apr 2011 22:07:26 -0400 Original-Received: from [140.186.70.92] (port=46172 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6vfo-0005pG-KL for bug-gnu-emacs@gnu.org; Mon, 04 Apr 2011 22:07:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q6vfn-0001jC-Bq for bug-gnu-emacs@gnu.org; Mon, 04 Apr 2011 22:07:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q6vfn-0001j7-96 for bug-gnu-emacs@gnu.org; Mon, 04 Apr 2011 22:07:15 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q6vHO-0001ZD-IR; Mon, 04 Apr 2011 21:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Apr 2011 01:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8415 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 8415-submit@debbugs.gnu.org id=B8415.13019676995995 (code B ref 8415); Tue, 05 Apr 2011 01:42:02 +0000 Original-Received: (at 8415) by debbugs.gnu.org; 5 Apr 2011 01:41:39 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q6vH1-0001Ye-L0 for submit@debbugs.gnu.org; Mon, 04 Apr 2011 21:41:39 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q6vGy-0001YR-TK for 8415@debbugs.gnu.org; Mon, 04 Apr 2011 21:41:37 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAFhymk1Ld/Y6/2dsb2JhbAClaHiIebovhWsElkU X-IronPort-AV: E=Sophos;i="4.63,300,1299474000"; d="scan'208";a="103194464" Original-Received: from 75-119-246-58.dsl.teksavvy.com (HELO ceviche.home) ([75.119.246.58]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 04 Apr 2011 21:41:30 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 9C82E660B0; Mon, 4 Apr 2011 21:41:30 -0400 (EDT) In-Reply-To: <4D9A45CD.4030808@gmail.com> (Daniel Colascione's message of "Mon, 04 Apr 2011 15:27:25 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 04 Apr 2011 21:42:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45634 Archived-At: >> AFAICT, the code currently doesn't guess: the different kinds of values >> are mutually exclusive. So the moment at which they decide which >> code to use doesn't matter because it'll give the same answer (tho >> as you point out there are errors in this code currently because it's >> dispersed). > Polymorphism-via-typecase is delicate at best no matter what language we're > working in. [ Irrelevant side-comment: Completely depends on the problem at hand: it makes adding "methods" much easier. ] >>> So we will have to make almost all values a struct anyway to fix bugs >>> like this. >> Yes, all new types will use register structs. That's not a problem. >> And you can even later-on de-support old types and have them go through >> register structs as well. > What's wrong with getting it over with now? It's the difference between "one simple obviously correct change" and "one big change that might be correct". > I'd also slightly prefer Leo's structure approach to the > dispatcher-function one below. I tend to agree, tho both kind of suck: we'd want real objects with dynamic dispatch instead. Stefan