Re: make it so that (=? "hi" "hi") works
Sandra Snan 26 May 2021 06:50 UTC
Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> writes:
> But it is still better to pass around a comparator explicitly instead
> of relying upon the default comparator. This way, the user of your
> algorithm can decide by himself whether to pass a specific comparator
> or to pass the default comparator.
Also this. Isn't this a good argument against ever defining any names or
procedures?
Add1 and sub1 are a good analogies here, both which come in a version
without a default addend, too. + and - respectively.
I did propose providing a version with a separate, longer name that took
a comparator as argument. Not really necessary since there is fluid-let,
or temporarily registering and restoring comparator (parameters are not
shared across threads).