Skip to content

Option map/map_consume vs chain_ref/chain naming inconsistency #7830

Closed
@bblum

Description

@bblum

map and chain_ref take the option by reference, and map_consume and chain take the option by value and unwrap it inside. We should decide whether we prefer the -consume or the -ref suffix, and standardize the stdlib to it. (I bet Either has the same problems.)

My vote is for the shorter name being consuming, and having a -ref suffix.

Nominating backwards-compatibility milestone. While not about language syntax, these functions are pervasive enough that renaming them after 1.0 would be a big hassle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions