Skip to content

Restrict codepoints of valid identifiers #5936

@stevengj

Description

@stevengj

As mentioned in #5434, separate from the question of what unicode normalization we should use for identifiers, it would probably be a good idea to restrict the codepoints of valid identifiers. Currently, you can do crazy things like:

julia> ² = 1
1
julia> 2²
2
julia> 2= 1
1
julia> 1 + 2
2
julia> –3 = 3
3
julia> -3 + –3
0

Python 3's valid identifiers provide one possible model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingThis change will break codeneeds decisionA decision on this change is neededunicodeRelated to unicode characters and encodings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions