Drew Adams wrote:
> "The functions" can't be "easier to see" than the single
> function
Many functions that each do little are easier to see than few
functions that each do a lot, because with many functions that
each do little, the function names are often enough to
understand what they do and h
On Sun, 17 Sept 2023 at 17:46, Emanuel Berg wrote:
> For example, (+ ...), (- ...) etc are preferable to
> (arithmetic :operation 'addition ...),
> (arithmetic :operation 'subtraction ...) etc.
Let’s reframe that in more real-life examples. What is preferable and why:
1. a couple of functions
> Many functions that each do little are easier to see than few
> functions that each do a lot, because with many functions that
> each do little, the function names are often enough to
> understand what they do and how they work - and they require
> none or very little documentation.
>
> But with
Drew Adams wrote:
> your claim that it's always better to define separate
> functions instead?
You are claiming that - but I disagree.
--
underground experts united
https://dataswamp.org/~incal
Yuri Khan wrote:
> 1. a couple of functions
>a. ‘(my-sort-by SEQ LESSP)’ where LESSP is a function accepting two
>elements X and Y and returning ‘t’ when X should be
>sorted before Y, and
>b. ‘(my-sort-on SEQ KEY)’ where KEY is a function accepting an
>element X and