Skip to content

Harmonise our use of !! #653

Open
Open
@mhauru

Description

@mhauru

We are currently inconsistent in our use of methods with !! at the end of the name. We sometimes call them but discard the return value, assuming they mutate; some methods which return their value are only marked width !; there may be a few that have !! in the name but don't in fact always return a value; etc. Once #555 is done I would like to take a pass over the codebase and make it such that

  • ! methods never return a value. [EDIT: See comments]
  • !! methods always return a value.
  • Whenever we call !! methods we make use of the return value and don't assume mutation.

I would also like to switch to using !! methods in many places where we currently use ! methods. For instance, in #555 I'm building towards VarInfo being such that you can push!! new values to it that don't fit the element or VarName type of the current VarInfo, and if need be a new object is returned with expanded types, although most often that's not necessary and the old object is returned mutated. This might help simplify building VarInfos that with concrete types.

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