bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#29786: 27.0.50; About the argument list of methods


From: Stefan Monnier
Subject: bug#29786: 27.0.50; About the argument list of methods
Date: Wed, 27 Dec 2017 09:52:52 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> > (cl-defmethod seq-mapn (function (stream stream) &rest streams)
[...]
>> > \(fn FUNCTION STREAMS...)"
>> I think this "\(fn FUNCTION STREAMS...)" thingy doesn't make sense for
>> `cl-defmethod`: it only makes sense for `cl-defgeneric`.
> But it does make sense in this example, no?

Not really, no: in the docstring of `seq-mapn` what we want to show to
the user about the above method is when it applies, i.e. its
"specializers".  We could try to make it say that the specializer is
"all args after `function` are of type `stream`", but there's no
standard format to express that.  We could invent one, like

    (seq-mapn FUNCTION &rest (STREAMS (list stream)))
or
    (seq-mapn FUNCTION (STREAM stream) ...)

but it seems like more trouble than it's worth.


        Stefan





reply via email to

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