Skip to content

Allow multi-character identifiers and special symbols as identifiers for definitions #42

Closed

Description

@anton-trunov

IMHO, Add := λmn. m S n or + := λmn. m S n are more suggestive compared to one-letter identifiers like A.

Activity

  1. evinism commented on Jun 8, 2017

    @evinism
    Owner

    Allowing multicharacter variable names has been one of the more annoying problems that I haven't quite figured out yet-- how do we deal with the ambiguity of saying SUCC being one variable, vs. ((SU)C)C, while still keeping the metalanguage relatively small and succinct?

    Options are:

    • let the lexer look up to see if a symbol SUCC exists in the execution context before lexing as (((S)U)C)C
    • require whitespace around single letter variable names
    • something else??

    I don't personally like either of those two options, but I'm leaning towards the second one, it seems to be done half the time anyways, or whenever ambiguity pops up.

    As for certain special characters, we can just whitelist those.

  2. anton-trunov commented on Jun 8, 2017

    @anton-trunov
    Author

    What about a special case where words starting with a capital letter are tokenized as a single identifier? SUCC, Succ, etc. It seem like people almost never use uppercase letters under lambdas.

  3. evinism commented on Oct 19, 2017

    @evinism
    Owner

    implemented in #55, merging after green

  4. evinism commented on Jan 13, 2019

    @evinism
    Owner

    I'm reopening this because I'm addressing the idea of special symbols as identifiers. This should be made easier by: #65 because now we no longer have the restriction that eta is a privileged character that the user can't input.

  5. evinism commented on Jan 16, 2019

    @evinism
    Owner

    implemented here #71

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions