> On Oct 12, 2015, at 8:35 PM, Alexis King <lexi.lam...@gmail.com> wrote:
> 
> I’m not completely sold on `most`, but I’m close. I like that it’s terse and 
> fairly obvious in what it does. The obvious downside is that it’s a little 
> vague. The expression (most < lst) doesn’t read super well, IMO.
> 
> I think passing a less-than? argument makes this function much closer 
> conceptually to `sort` than anything else, even if it’s really a `fold` in 
> reality. In my mind, this function semantically sorts a list and returns the 
> first element from the result. I think the name should reflect that.
> 
> This is why names like “find-best” and “find-optimal” don’t quite sit with 
> me. They might be the best options—I haven’t found anything clearly better 
> yet—but these names express an intent that simply isn’t there. It would be 
> like calling `append-map` something like `explode` or `permute`: it might 
> describe how the behavior is used in 70% of cases, but it does a poor job of 
> explaining what the function actually does.

What intent that isn't there?
I have my own use cases in mind though, so I might be not be seeing it.

> In the same line of thought as `append-map`, the name `first-sort` has 
> crossed my mind, but this feels just as opaque. The name `first-by` is very 
> close, but it fails: that function has a meaning closer to `findf` to me, not 
> whatever this function is.

To me, `first-by` doesn't seem like findf. To me it implies the same sort of 
first of a sorted list semantics, but without implying that it has to sort the 
whole list. That's why I like it almost as much as find-best.

> Other names in the same vein are too wordy: `first-with-order`, 
> `first-of-sorted`... and none of those convey the meaning any better, anyway.
> 
> So yes, at this point, the conversation may be little more than bikeshedding. 
> It might be best to just pick one of the better solutions and roll with it.


-- 
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