[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20420: 25.0.50; eieio methods with optional arguments now fail

From: Stefan Monnier
Subject: bug#20420: 25.0.50; eieio methods with optional arguments now fail
Date: Sun, 26 Apr 2015 00:02:51 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> 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).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]