My responses to Robby Findler, Andrew Kent, JCG, Ben Lerner, and Matthias 
Felleisen:

Something I should have said before:
I want this to be one abstraction over both find-min and find-max.

> On Oct 11, 2015, at 6:29 PM, Robby Findler <ro...@eecs.northwestern.edu> 
> wrote:
> 
> Find-best is right to me. The "best" under < is the most negative number. 
> Find-maximal is also okay and slightly more accurate. 


Alexis King didn't like "best" because it seems to opinionated and too specific 
about good things (if I understand correctly), and I agree that it could be 
confusing if you're using best to find the worst case. I personally like 
find-best so far, but I don't know about Alexis or anybody else. 

ps I don't like maximal because it feels too number-y.

> On Oct 11, 2015, at 8:56 PM, Robby Findler <ro...@eecs.northwestern.edu> 
> wrote:
> 
> :)
> 
> Maximal isn't numbery. It is more accurate because you might not have a total 
> order (and thus not a single best).


Um, I think of it as number-y. Maybe you and other awesome people abstracted 
this stuff out, but I think of it as number-y.

Another thing is that since this is a sort of generalization of both find-min 
and find-max, it should not use words like maximal or optimal, because that 
implies find-max but not find-min. I'm not sure about that though. You could 
make that same argument against best, but best feels far enough away from max 
that you can imagine the best being the minimum. That's just a general feeling 
though.

> On Oct 11, 2015, at 7:43 PM, Andrew Kent <andmk...@indiana.edu> wrote:
> 'leftmost' or 'rightmost'? Or 'find-leftmost' 'find-rightmost'? I dunno, 
> maybe those are more confusing. They seem to hint at the right idea to me (at 
> least as it relates to argument order and the relation).
> 
I think I would find those confusing.
Also note that we were talking about one abstracted function for both find-min 
and find-max, not two, one for each of them. Also also don't think this should 
have to imply sorting, because it doesn't have to sort through the whole list. 
It only has to find the best or most relevant element, not the order of each 
one.

I do see what you are saying, but it doesn't seem as clear as find-best or 
find-most-relevant.

> On Oct 11, 2015, at 9:07 PM, Ben Lerner <bler...@ccs.neu.edu> wrote:
> 
> What about "find-min-by"/"find-max-by"?  (Or, if it's more standard Rackety 
> style, "find-min/by" and "find-max/by", where the slash denotes a variant of 
> an otherwise common function...)


Hello. I think find-min-by and find-max-by would conceptually be good names for 
find-min and find-max, but not for the function abstracting over both of them. 
To me the by implies that there's some property that it's comparing them by, 
and that's already what find-min and find-max do (which is exactly what argmin 
and argmax do). 

> On Oct 11, 2015, at 8:45 PM, JCG <griffin...@gmail.com> wrote:
> 
> I had the same question for a similar set of library functions not in 
> racket).  I chose 'most -  'most', e.g. most negative, most positive, most 
> length.

Most seems to number-y again. I guess I think of maximal, optimal, and most as 
quantitative things, but best and most-relevant as qualitative things. Maybe 
that's why I think of them as number-y. They don't feel as abstract.

I want this to be an abstraction over both find-min and find-max.

> On Oct 11, 2015, at 9:39 PM, Matthias Felleisen <matth...@ccs.neu.edu> wrote:
> 
> argbest 

Um, ok. If we were making the naming consistent with argmin and argmax, that 
would be good. But we renamed those to find-min and find-max because we thought 
arg... was confusing. I know we try not to be confusing here. 

> On Sun, Oct 11, 2015, 6:25 PM Alex Knauth <alexan...@knauth.org 
> <mailto:alexan...@knauth.org>> wrote:
> Hi,
> 
> Alexis King and I were discussing adding versions of argmin and argmax to the 
> alexis/collection library, but we agreed that find-min and find-max were 
> clearer names. Then we came up with a generalization of those that would take 
> an ordering procedure (< for find-min and > for find-max), and find the 
> element that had a property greater/less than the properties of all the other 
> elements, by the ordering procedure (not restricted to numbers). 
> 
> The problem was naming it. We thought of `find-best` and 
> `find-most-relevant`, but `find-best` would be confusing when it's being used 
> to find the worst case, and `find-most-relevant` seems better but to wordy. 
> 
> Do any of you have any ideas?
> 
> Examples:
> > (the-function < first '((3 pears) (1 banana) (2 apples))) ; find-min would 
> > be a shorthand for this
> '(1 banana)
> > (the-function > first '((3 pears) (1 banana) (2 apples))) ; find-max would 
> > be a shorthand for this
> '(3 pears)
> > (the-function string<? (compose1 symbol->string second) '((3 pears) (1 
> > banana) (2 apples)))
> '(2 apples)
> > (the-function string>? (compose1 symbol->string second) '((3 pears) (1 
> > banana) (2 apples)))
> '(3 pears)
> 
> https://github.com/lexi-lambda/racket-alexis-collections/pull/9#issuecomment-145727937
>  
> <https://github.com/lexi-lambda/racket-alexis-collections/pull/9#issuecomment-145727937>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to