From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#8415: 23.3.50; Extensible Emacs Registers Date: Mon, 04 Apr 2011 18:49:43 -0700 Message-ID: <4D9A7537.5030005@gmail.com> References: <4D9A45CD.4030808@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigA2E182B906140D7A46DAC46C" X-Trace: dough.gmane.org 1301969257 373 80.91.229.12 (5 Apr 2011 02:07:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 5 Apr 2011 02:07:37 +0000 (UTC) Cc: Davis Herring , 8415@debbugs.gnu.org, Leo To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 05 04:07:30 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-0006YH-Um for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Apr 2011 04:07:28 +0200 Original-Received: from localhost ([127.0.0.1]:56943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6vfz-0005rS-3R for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Apr 2011 22:07:27 -0400 Original-Received: from [140.186.70.92] (port=46175 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6vfo-0005pT-PI 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-0001jK-Rf for bug-gnu-emacs@gnu.org; Mon, 04 Apr 2011 22:07:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q6vfn-0001jG-Q4 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 1Q6vP8-0001k9-LE; Mon, 04 Apr 2011 21:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione 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:50: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.13019681986686 (code B ref 8415); Tue, 05 Apr 2011 01:50:02 +0000 Original-Received: (at 8415) by debbugs.gnu.org; 5 Apr 2011 01:49:58 +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 1Q6vP3-0001jn-SR for submit@debbugs.gnu.org; Mon, 04 Apr 2011 21:49:58 -0400 Original-Received: from mail-yx0-f172.google.com ([209.85.213.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q6vP1-0001jb-Us for 8415@debbugs.gnu.org; Mon, 04 Apr 2011 21:49:56 -0400 Original-Received: by yxk30 with SMTP id 30so2349517yxk.3 for <8415@debbugs.gnu.org>; Mon, 04 Apr 2011 18:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type; bh=mtFgeROog1EqyDxDBTXAGj4SAZuexI+sZvetxt1EfOA=; b=bbmK372w3jsYa7lIlDuy1EDQ0rFQNiF2S3Y5ZtuZ5+uId/FdP0s/UhYUeBQGPt3+NU CQDRteyrEtupIit4Bo8aQx/bqcQjAtclPPb+e5WI6xQ/51AEIeSdyJa8YW+AgV80C8GS wRzVBuLeV4nH1yilOS4iLDZuO9wAnj86QoeZQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; b=hWoXTZgdzKXineXE2xmr/7/mMnE2hr6QXSUq0OIFtXSew7uMeW9gkPp9CIvGZXcBd+ pq+gJzih4YBIBGeS/I1L2EWqLj99SPJ0uJhfABEW36VqUnfAx/z/eJw1OoxFsulGtXDw NXyO+cMV4f2VfzguZhi6CKE2G4WjcRERP91HY= Original-Received: by 10.150.62.1 with SMTP id k1mr7252761yba.382.1301968190278; Mon, 04 Apr 2011 18:49:50 -0700 (PDT) Original-Received: from edith.local (c-67-183-23-114.hsd1.wa.comcast.net [67.183.23.114]) by mx.google.com with ESMTPS id y5sm2623467yhc.83.2011.04.04.18.49.48 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 04 Apr 2011 18:49:49 -0700 (PDT) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: X-Enigmail-Version: 1.1.1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 04 Apr 2011 21:50: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:45633 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA2E182B906140D7A46DAC46C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 4/4/11 6:41 PM, Stefan Monnier wrote: >> Polymorphism-via-typecase is delicate at best no matter what language = we're >> working in. >=20 > [ Irrelevant side-comment: Completely depends on the problem at hand: i= t > makes adding "methods" much easier. ] IMHO, those situations are the exceptions. >>>> So we will have to make almost all values a struct anyway to fix bug= s >>>> 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 throu= gh >>> register structs as well. >> What's wrong with getting it over with now? >=20 > It's the difference between "one simple obviously correct change" and > "one big change that might be correct". I see your point, though both approaches would be pretty small changes in the scheme of things. If you want to split the change into smaller steps, that's fine so long as we eventually aim to get rid of the typecase polymorphism. >> I'd also slightly prefer Leo's structure approach to the >> dispatcher-function one below. >=20 > I tend to agree, tho both kind of suck: we'd want real objects with > dynamic dispatch instead. Well, there's EIEIO. It gives you the ability to easily add methods while not baking the dispatch into each one. On the other hand, it's a quite a bit of code to pull into the core at runtime. --------------enigA2E182B906140D7A46DAC46C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iEYEARECAAYFAk2adToACgkQ17c2LVA10Vs28gCfaPTpqbzouL/4SIZlaEe9Yh/H MyAAoLok1BmMKW9ib665aDRgE0d8NyA4 =586L -----END PGP SIGNATURE----- --------------enigA2E182B906140D7A46DAC46C--