[aur-general] [ansible-aur] call for comment on pull request 50
roland.puntaier at chello.at
Mon Jan 25 10:26:26 UTC 2021
On Sat 21Jan23 23:03, Leandro Papi via aur-general wrote:
>On Sat, 23 Jan 2021 at 19:31, Roland Puntaier via aur-general
><aur-general at lists.archlinux.org> wrote:
>> Generally if-then-else tend to propagate and inflate the code.
>> The code base becomes larger and slower.
>Sorry, I'm sincerely curious, in what programming language spawning a
>shell to run a command only to have that command blurt out a warning
>(and perhaps having to parse STDOUT and/or STDERR to catch that
>warning) is _faster_ than a simple branching condition on the length
>of a list?
>My 2 cents are that it would be a lot easier (and faster) for both A
>and B if neither of them allowed empty package lists.
>Heck, I'd even put that if-then-else anyways in my code just to avoid
>spawning a shell, or calling an external hook.
The program wouldn't spawn further activity internally,
if there are no packages.
But as an interface it should look like 0 packages is the same as n packages.
Anyway, I was more talking about the human processing.
All the programmers that use pacman, yay, ... ansible.aur
need to put an "if" to check whether their variable is not 0 to avoid an error.
With computer programs we try to take away effort from humans.
More information about the aur-general