I've been using which for decades, including on SunOS and AIX.
When I know it's a script, less `which foobar` is quick and easy.
None of the alternatives listed do the same thing.
Yes, which has issues, but you're breaking what people have used
for a very, very long time.
From a bash session:
DEPRECATION
Since type and command -v were mandated by POSIX,
this utility is no longer
useful for maintainer scripts and thus will be
removed from debianutils.
Debian 9 Jul 2021
WHICH(1)
ejr@signbit:~/kernel/linux$ type ls
ls is aliased to `ls --color=auto --hyperlink=auto'
ejr@signbit:~/kernel/linux$ command -v ls
alias ls='ls --color=auto --hyperlink=auto'
ejr@signbit:~/kernel/linux$ which ls
/usr/bin/which: this version of 'which' is deprecated and should
not be used.
/usr/bin/ls
ejr@signbit:~/kernel/linux$ whereis ls
ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz
ejr@signbit:~/kernel/linux$ whence ls
bash: whence: command not found
ejr@signbit:~/kernel/linux$ command which ls
/usr/bin/which: this version of 'which' is deprecated and should
not be used.
/usr/bin/ls
ejr@signbit:~/kernel/linux$ command -v which ls
/usr/bin/which
alias ls='ls --color=auto --hyperlink=auto'