Skip to content

Suspend terminology #152

@backuitist

Description

@backuitist

Cats-effect uses suspend to describe the action of capturing an effect. I believe that suspend is generally understood to mean something else: suspending a computation, that is, to return the control immediately.

Here are a few occurrences that I found:

In addition, there exists a synonymous to suspend, capture as seen in #78
In my opinion, capture does a better job at describing what IO does as suspend suggests that "unsuspension" (i.e evaluating your effect) isn't repeatable. This is of course highly debatable.

Furthermore, the use of suspend for side-effects makes it unavailable for other uses, such as a "semantically blocking" operation: typelevel/fs2#1097 (comment)

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