Skip to content

Why are tabs illegal? #2288

@kili-ilo

Description

@kili-ilo

I'm personally ambivalent on tabs vs. spaces for indentation, but I'm surprised that Roc takes such a strong stance against tabs. It seems that tabs are illegal anywhere except string literals and application names:

  • When used for indentation, the type checking step of the compiler throws an unformatted index out of bounds: the len is 11 but the index is 11 panic.
  • When used anywhere else (such as between function arguments), the type checking step of the compiler throws a well-formatted Tab characters are not allowed. error.

Is this an intentional choice (to enforce consistency between developers? to enable the editor to use the tab key for features?) or is tab support on the roadmap?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions