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

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

Re: Passing buffers to function in elisp


From: Michael Heerdegen
Subject: Re: Passing buffers to function in elisp
Date: Thu, 23 Feb 2023 10:34:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

<tomas@tuxteam.de> writes:

> > Is it better just to assume in functions that the current buffer is
> > the data buffer and work on that, instead of passing data as
> > function arguments?
>
> That depends on your style and on the "contracts" you make
> with yourself (and ultimately, of course, on what you are
> trying to do: for each different purpose, some style will
> be clearer/more efficient -- ideally both, but life and
> things).

And there is not only garbage, there is also the aspect of speed: many
operations can be performed in buffers and likewise for strings, but
sometimes operations are a lot faster for strings (modifying a buffer is
a more complicated operation).

Michael.




reply via email to

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