Skip to content

Swap the roles of in and of #702

@satyr

Description

@satyr

I find it pretty confusing that of compiles to in and in arraywise operations.
It'd be easier for beginners if we kept the meaning of in from JS and then introduced of for a cool addition.

According to Jeremy it's all about readability, but for me neither reads much better than another:

  • Current
    • for key of object
      • for key, value of object
    • for item in array
      • for item, index in array
  • Proposed
    • for key in object
      • for key, value in object
    • for item of array
      • for item, index of array

Do you feel one much more readable than another?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions