Skip to content

Purity of numerical algorithms #510

Open
@berquist

Description

@berquist

We had a discussion in #495 about the purity of functions. The argument is that for many algorithms, specifically numerical ones, the implementation should not be pure for performance reasons, specifically memory. While the goal is not to write for performance, an algorithm should be written idiomatically for both 1. the language and (potentially) 2. how it is used. Also, from my experience, while it is easier to reason about the output of a pure numerical function by definition, it is not always easier to read. For algorithms of the scale in this book, this is probably a non-issue.

My proposal was to write all algorithms as being pure, but have text somewhere explaining the difference in the context of numerical algorithms, because it is an important topic not often touched upon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DiscussionThis is open for a discussion.QuestionThis is a Question.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions