Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rename MAXIMUM-OF and MINIMUM-OF to FIND-MAX and FIND-MIN, respectively #1971

Closed
Siskin-Bot opened this issue Feb 15, 2020 · 0 comments
Closed
Labels
Oldes.resolved Bugs/wishes with Oldes' fixes/features Status.important Type.wish

Comments

@Siskin-Bot
Copy link
Collaborator

Siskin-Bot commented Feb 15, 2020

Submitted by: BrianH

MAXIMUM-OF and MINIMUM-OF don't actually return the maximum or minimum of a series, they return the series at the position of the maximum or minimum. Gregg has suggested that these be renamed to FIND-MAX and FIND-MIN instead. This would allow us to create different MAXIMUM-OF and MINIMUM-OF functions which actually do return the maximum and minimum values (see #1972 for such a proposal).

Normally this would be against the (defacto) legacy naming rules, but we make an exception for functions that are rarely used and really badly named, especially when we have a much better use for the name. MAXIMUM-OF and MINIMUM-OF fit that description.

This issue was last mentioned in #1818, but was first brought up in AltME years ago. See also #428 for issues that relate to /skip behavior of these functions.


Imported from: CureCode [ Version: r3 master Type: Wish Platform: All Category: Mezzanine Reproduce: Always Fixed-in:none ]
Imported from: metaeducation#1971

Comments:

Rebolbot commented on Feb 27, 2013:

Submitted by: BrianH

Ch.Ensel (aka ChristianE) suggested that these be named AT-MAXIMUM and AT-MINIMUM instead in #1818. However, the functions don't really seem related to AT. For AT, you already know and specify the position; for these functions, you are trying to find the position. These really seem like they're more related to FIND.


Rebolbot commented on Mar 13, 2013:

Submitted by: Gregg

I agree with this change. From the old AltMe chat on it, Ladislav was against it, but suggested doc string changes would help. Here were my proposals at that time:

FIND: "Returns the series where the value is found, or none if the value is not found."

FIND-MAX: "Returns the series where the largest value is found, or none if the series is empty."

AT-MAX: "Returns the series at the position where largest value is found, or none if the series is empty."

AT-MAX: "Returns the series at the largest value, or none if the series is empty."

I still prefer the FIND* variant over AT*, but either is better than what we have now.


Rebolbot commented on Feb 20, 2014:

Submitted by: BrianH

Requested Oldes/Rebol-wishes#58 to be better able to implement functions like these with the #428 record comparison rules.


Rebolbot mentioned this issue on Jan 12, 2016:
Create new MAXIMUM-OF and MINIMUM-OF functions that do what they say
Revisit, refactor or rename tuple!
Incompatibility between maximum-searching and sorting
FOR start end bump behavior inconsistent, doesn't make sense
DO-COMPARE function


Rebolbot mentioned this issue on Jan 22, 2016:
[Epic] Backwards-incompatible API changes, for the greater good


Rebolbot added Type.wish and Status.important on Jan 12, 2016


# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Oldes.resolved Bugs/wishes with Oldes' fixes/features Status.important Type.wish
Projects
None yet
Development

No branches or pull requests

2 participants