Lars Schneider <larsxschnei...@gmail.com> writes:

>> -static struct cmd2process *find_multi_file_filter_entry(struct hashmap 
>> *hashmap, const char *cmd)
>> +static struct subprocess_entry *find_multi_file_filter_entry(const char 
>> *cmd)
>
> I am curious why you removed the hashmap parameter (here and in other pars of 
> this patch). 
> I know the parameter is not strictly necessary as the hashmap is a global 
> variable anyways. 
> However, I think it eases code maintainability in the long run if a function 
> is "as pure as 
> possible" (IOW does rely on global state as less as possible).

If the original relied on a global hashmap and this update kept the
code like so, I wouldn't mind the end result of this series
(i.e. rely on it being global).  But that is not the case.  It is
making the code worse by stopping passing the hashmap through the
callchain.

Reply via email to