Le ven. 17 avr. 2026 à 18:46, Paul Eggert <[email protected]> a écrit :
>
> On 2026-04-17 06:23, Laurent Lyaudet wrote:
> > My patch works, it adds a needed feature
>
> It's not clear that the feature is all that needed for shell scripts,
> given that one can write something like this:
>
>    for file in *; do
>      lines=$(wc -l <"$file") &&
>      printf '"%s" contains %d lines\n' "$file" $lines
>    done
>
> where you can substitute whatever command you like for the printf command.
>
> If the feature were needed we could indeed add it, but given the
> relative lack of need it could well be better to leave wc alone. There
> is a nonzero cost to support unnecessary features.
>
> I write this email in the hope that others can see this approach to the
> original problem.

I don't see the point of a solution in 4 lines instead of 1 line,
where the intent is not obvious.
Both for code compactness and code understanding,
my solution is superior.

>    for file in *; do
>      lines=$(wc -l <"$file") &&
>      printf '"%s" contains %d lines\n' "$file" $lines
>    done

VS

lines=$(wc -ln "$file")

Why is free software full of people judging ideas on conservatism and
authority argument?
If someone well-known brings a half-backed idea is listened to.
Why nobody learned the lesson I read in an account on the life of the
founder of Perl to language to just
"listen to ideas of others with the mindset that it may be good ideas"?
I did the code.
What's the point of nonzero cost argument?
Stop using a computer, everything in it has a nonzero cost.



Reply via email to