Skip to content

Ambiguous syntax with operator suffixes #28441

@perrutquist

Description

@perrutquist

In Julia 0.6, the following is legal syntax:

ᵃx = 3
1+ᵃx # returns 4

But after #22089, it errors with "UndefVarError: +ᵃ not defined", because it parses as 1 +ᵃ x.

One possible remedy would be to deprecate variable names that begin with characters that are allowed as operator suffixes.

Another option would be to require spaces around suffixed operators.

Or do both, with the options of removing the spaces requirement in a later version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingThis change will break codeparserLanguage parsing and surface syntax

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions