Our current distances API uses a simple enum (see raft/distance/distance_types.hpp). The general design of accepting the enum along with an optional metric_arg argument follows the Scipy and Scikit-learn APIs, but as @mhoemmen points out, it could be made a little more C++-friendly by accepting an actual type for the distances which can be paired w/ any metric_arg options they might support. The enum + metric_arg is used in several places in RAFT and so I think it warrants a larger discussion on how we should redesign this API (if at all) so that we can update it across RAFT and its consuming libraries all at once.