Skip to content

add to var vs modify #7

Description

@stephlabou

In functions, need clarity on x example for adding to variable vs modifying variable. I think we may be conflating two topics:

  • adding to variable type that can accept additional content (more of appending, like adding content to array as in potato example)
  • modifying variable as in overwriting existing content

As written, I can see some confusion because x <- x + 1 is used as an example for both. In context of mismatch in data type, but that is more about not being able to add integers and strings, less about ability to add content to a variable, depending on structure, vs overwriting variable entirely.

Anyway, flagging for discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions