GNU bug report logs - #8415
23.3.50; Extensible Emacs Registers

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Sun, 3 Apr 2011 12:30:03 UTC

Severity: wishlist

Tags: patch

Found in version 23.3.50

Fixed in version 24.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daniel Colascione <dan.colascione <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Davis Herring <herring <at> lanl.gov>, 8415 <at> debbugs.gnu.org, Leo <sdl.web <at> gmail.com>
Subject: bug#8415: 23.3.50; Extensible Emacs Registers
Date: Mon, 04 Apr 2011 18:49:43 -0700
[Message part 1 (text/plain, inline)]
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.
> 
> [ Irrelevant side-comment: Completely depends on the problem at hand: it
>   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 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 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.
> 
> 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.

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 13 years and 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.