[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Knowing where a function has been used (bis) [Was: Re: Optimising El
From: |
Emanuel Berg |
Subject: |
Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code] |
Date: |
Thu, 11 Oct 2018 22:05:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Barry Margolin wrote:
> Long functions are often long because of
> complex logic, which can be hard to extract
> into separate functions.
>
> Also, we tend to extract code into separate
> functions only when there's some logic to it
> -- it has to have a meaningful identity
> outside the function where it exists.
> If a function can only be used in one place,
> and refers to lots of the variables in that
> caller, then it's often hard to justify
> splitting it out -- it actually makes things
> more confusing because the modularity doesn't
> make sense.
Complexity isn't reduced by having tons of
stuff in a single function that goes on
forever- on the contrary, this makes it more
difficult to read, understand, and maintain.
But of course the modularity should make sense!
> I doubt that anyone makes decision about
> whether to split large functions into
> separate functions based on the overhead of
> function calling.
This is what the Gnus people told me when
I suggested not writing functions that are
longer and deeper than a novel by Dostoevsky -
they said, ~"Gnus is slow, Elisp is slow,
making neat modules of those defuns will make
it even slower."
--
underground experts united
http://user.it.uu.se/~embe8573
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], (continued)
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Garreau, Alexandre, 2018/10/07
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Barry Margolin, 2018/10/07
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/08
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Garreau, Alexandre, 2018/10/08
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/08
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Barry Margolin, 2018/10/08
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/09
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Barry Margolin, 2018/10/10
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/10
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Barry Margolin, 2018/10/11
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code],
Emanuel Berg <=
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Barry Margolin, 2018/10/12
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Eric Abrahamsen, 2018/10/12
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/13
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], tomas, 2018/10/14
- Message not available
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/14
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], tomas, 2018/10/15
- Message not available
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/15
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Van L, 2018/10/15
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Garreau, Alexandre, 2018/10/16
- Message not available
- Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code], Emanuel Berg, 2018/10/17