Skip to content

pure/impure modifiers for functions #559

@lars-reimann

Description

@lars-reimann

Is your feature request related to a problem?

Currently, we use annotations to denote the purity of functions. Since the information is vital for our execution concept, the use of modifiers for this purpose makes sense.

Desired solution

pure fun f() to denote a pure function.
impure fun g() to denote an impure function.

Remaining question: How do we denote the reasons for impurity? For a start, it suffices to denote

  • file reads with path given by constant
  • file reads with path given by parameter
  • file writes with path given by constant
  • file writes with path given by parameter.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Assignees

Labels

releasedIncluded in a release

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions