Re: [PATCH 1/5] lib/sort: Make swap functions more generic

From: Andrey Abramov
Date: Thu Mar 14 2019 - 16:05:56 EST


> Pistols at dawn?

> swap_bytes
> swap_4byte_words
> swap_8byte_words
or
> Âswap_bytes / swap_ints / swap_longs
> Âswap_1 / swap_4 / swap_8

Yes, in my opinion, swap_bytes / swap_ints / swap_longs are the most readable because we have both swap_ints and swap_longs functions (in one file near each other), so I don't think that there will be any confusion about size.
But actually, it doesn't matter which name will you take, because the meaning of each, in my opinion, is obvious enough, so I don't mind about any of these options.

--
With Best Regards,
Andrey Abramov