Skip to content

Delete map(f, ::AbstractString) special case #57071

Open
@LilithHafner

Description

@LilithHafner

Do we actually want this?

julia> map(x -> x+1, "abc")
"bcd"

julia> map((x,y) -> x+1, "abc", [1,2,3])
3-element Vector{Char}:
 'b': ASCII/Unicode U+0062 (category Ll: Letter, lowercase)
 'c': ASCII/Unicode U+0063 (category Ll: Letter, lowercase)
 'd': ASCII/Unicode U+0064 (category Ll: Letter, lowercase)

Is it worth the break from the typical semantics of map where the function always returns an AbstractArray?

Can we rename this method to stringmap?

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingThis change will break codeiterationInvolves iteration or the iteration protocolstrings"Strings!"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions