Skip to content

add a modifier for pure functions #7770

Open
@zpdDG4gta8XKpMCd

Description

@zpdDG4gta8XKpMCd

This is what pure means:

  1. no destructive operations on parameters
  2. all parameters must be guaranteed from being changed from the outside (immutable?)
  3. no calls to any other callback/function/method/constructor that doesn't have the pure modifier
  4. no reads from mutable values from a scope the pure function is closed over
  5. no writes to values in the closed scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.SuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions