all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Madhu <enometh@meer.net>
To: adam@alphapapa.net
Cc: emacs-devel@gnu.org
Subject: Re: please consider keeping defadvice around
Date: Mon, 11 Sep 2023 07:20:32 +0530 (IST)	[thread overview]
Message-ID: <20230911.072032.1439758278993953329.enometh@meer.net> (raw)
In-Reply-To: <3750971b-2947-65a4-b25f-d3a95a9c9c30@alphapapa.net>

*  Adam Porter <adam@alphapapa.net> <3750971b-2947-65a4-b25f-d3a95a9c9c30@alphapapa.net>
Wrote on Sun, 10 Sep 2023 03:46:54 -0500

>> * commit 27ed565ec6163c499191b62a4cee10d99019aa38
>> | Author:     Stefan Monnier <monnier@iro.umontreal.ca>
>> | AuthorDate: Thu Aug 3 23:41:11 2023 -0400
>> | Commit:     Stefan Monnier <monnier@iro.umontreal.ca>
>> | CommitDate: Thu Aug 3 23:41:11 2023 -0400
>> |
>> |    * lisp/emacs-lisp/advice.el (defadvice): Mark as obsolete
>> defadvice is a carefully designed and well documented piece of
>> software.  It provides a very useful abstraction on how to define
>> advice and provides easy hooks to disable specific advice, unadvise
>> and redefine advices.  At the least this is essential porcelein which
>> has to be reimplemente on top of the add-function add-advice plumbing.
>> I can see no good reason to deprecate and remove defadvice which is
>> valuble for both its design and beautiful documentation.  Removal
>> would only force the user to use the new sparesly-documented
>> interfaces to produce write-only opaque unnamed-closure-based
>> undebuggable code.
>
> What about DEFINE-ADVICE?  It seems to imitate the old DEFADVICE but
> using the new nadvice library.

DEFADVICE also uses the new framework.

All my concerns above stand.  The claim that it is "simpler" is
specious and does injustice to the earlier design and is
propaganada. The documentation of the new defadvice again defers to
the implementation details, does not provide the abstratcions that
were provided the difference in the quality of the documentation is
apparent.

> As well, the shortcomings of the old advice library, and
> improvements of the new nadvice library, are documented in the Elisp
> manual.  It seems like a worthy replacement.

The nadvice is freely available to use.  I see the obsoleting the old
mechanism is a move to destroy value and invalidate a valid design,
presumable based on personal prejudice.





  reply	other threads:[~2023-09-11  1:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-09 15:05 please consider keeping defadvice around Madhu
2023-09-10  8:46 ` Adam Porter
2023-09-11  1:50   ` Madhu [this message]
2023-09-11  2:28     ` Eli Zaretskii
2023-09-11  2:39       ` Madhu
2023-09-11  2:55         ` Emanuel Berg
2023-09-11 12:27         ` Eli Zaretskii
2023-09-11 12:51           ` Po Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230911.072032.1439758278993953329.enometh@meer.net \
    --to=enometh@meer.net \
    --cc=adam@alphapapa.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.