emacs-devel
[Top][All Lists]
Advanced

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

Re: other-buffer advice on kill-buffer


From: Stephen J. Turnbull
Subject: Re: other-buffer advice on kill-buffer
Date: Thu, 04 Aug 2011 11:24:10 +0900

Jérémy Compostella writes:

 > I do not understand why all these primitives functions do not call the Lisp
 > symbol instead of the C one. What is the reason ? Performance ? Constraints ?

Partly performance, I would think.  Advice is clearly a second-class
citizen here.  While I agree with the rule that advice must not be
used to implement core functionality, even in "minor" modules such as
rarely used modes, I think advice deserves more use than it gets.
However, the general opinion is (as you saw) that advice is to be
avoided.  So making advice work everywhere is not considered to be as
important as even a small performance loss in a very large number of
function calls.

However, code readability is probably far more important.
`Fother_buffer(buffer_object)' is far more readable than
`Ffuncall(2, intern("other_buffer"), buffer_object)' or even
`Ffuncall(2, Qother_buffer, buffer_object)'.



reply via email to

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