GNU bug report logs - #20420
25.0.50; eieio methods with optional arguments now fail

Previous Next

Package: emacs;

Reported by: Vitalie Spinu <spinuvit <at> gmail.com>

Date: Fri, 24 Apr 2015 19:29:01 UTC

Severity: normal

Found in version 25.0.50

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 20420 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Vitalie Spinu <spinuvit <at> gmail.com>
Cc: 20420 <at> debbugs.gnu.org
Subject: Re: bug#20420: 25.0.50; eieio methods with optional arguments now fail
Date: Sun, 26 Apr 2015 00:02:51 -0400
>> That tells me *how* you used it, not *where*.
> I was using it in polymode package for a generic indentation
> functionality:
>   https://github.com/vspinu/polymode/blob/master/polymode-methods.el#L530

[ After figuring out that the code now doesn't do that any more and
  seeing the old code which does do the "nasty" empty-args defmethod.  ]

I see, thanks.  At least the "workaround" did not require more code,
and is marginally more efficient to boot.

Looking more closely at the way this was handled in the older EIEIO
code, the semantics are pretty ugly, so it the fact that it worked is
clearly an accident, and reproducing that exact semantics would
be difficult.

> Aha. Cool! I will have a look. Is there a more elaborate documentation
> somewhere?

No, it's more a wishlist item: add support for formal pseudo-arguments
of the form "&context (<exp> <specializer>)".

> Particularly I don't see "specializer" and "generalizer"
> being properly defined anywhere.

"Specializer" is used commonly in CLOS to refer to the "thing" that can
be either a class type or (eql <value>).  "Generalizer" is not standard
and refers to a thing that takes a value (the actual argument) and finds
its corresponding specializers (i.e. its type(s)).  I took the term from
an article that extended CLOS method-matching.  cl-generic.el does not
directly implement that article, but it's fairly similar.

This said, adding support for &context shouldn't need to do very much
with specializers and generalizers (more specifically, shouldn't require
defining new specializers or generalizers).


        Stefan




This bug report was last modified 9 years and 61 days ago.

Previous Next


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