Skip to content

Allow \to or \mapsto for -> in anonymous functions #53053

@guberger

Description

@guberger
Contributor

I think it would help to have cleaner code if we could write

map!(x \to x^2, A) # where \to is replaced by its symbol

instead of

map!(x -> x^2, A)

Activity

adienes

adienes commented on Jan 25, 2024

@adienes
Member

not sure about this. there are a lot of arrow-like unicode characters. what about \longmapsto and \longrightarrow ? should ALL of them mean -> ?

guberger

guberger commented on Jan 25, 2024

@guberger
ContributorAuthor

I would say only \to or \mapsto according to the one we choose.

added
unicodeRelated to unicode characters and encodings
parserLanguage parsing and surface syntax
on Jan 26, 2024
barucden

barucden commented on Jan 26, 2024

@barucden
Contributor

What are some benefits over sticking to -> and using a font to one's liking (for example, this Discourse topic discusses Fira Code)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    parserLanguage parsing and surface syntaxunicodeRelated to unicode characters and encodings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @inkydragon@barucden@guberger@adienes

        Issue actions

          Allow `\to` or `\mapsto` for `->` in anonymous functions · Issue #53053 · JuliaLang/julia