I have been looking for guidance on best practice regarding the usage of aliased library functions, such as builtins.concatStringsSep, lib.concatStringsSep and lib.strings.concatStringsSep, but was unable to find any so far.
Quickly searching through the current (4e64dfc2) Nixpkgs repo yields the following results on usage statistics:
nixpkgs ❯ rg 'builtins\.concatStringsSep' | wc -l 301 nixpkgs ❯ rg 'lib\.concatStringsSep' | wc -l 1184 nixpkgs ❯ rg 'lib\.strings\.concatStringsSep' | wc -l 53 There are times, where I would prefer builtin, as it doesn’t require importing lib, which can make evaluating quick expressions in the shell easier. At other times I feel like using everything from lib would be more consistent and I wouldn’t have to worry about where something comes from, thus less things to remember and keep track of. On the other hand using the full lib.module.function form makes it feel a bit more organized.
Are there reasons that I haven’t thought of or official recommendations that I haven’t managed to find, or is it really just up to personal preference?
Thanks in advance!
ps.: Sorry if I have selected the wrong category for this topic. I felt like it would fit in here, but feel free to move it elsewhere if I was wrong!