Skip to content

Rename return to pure #700

Closed
Closed
@byorgey

Description

People coming from an imperative programming background might be confused by return. For example, they might be confused by the fact that move; return (); move does not ignore the second move; they might be confused by the need for return in code like if foo {grab; return ()} {}; etc. Some options for improving the situation include:

  • Renaming return to something else (pure? result? output?)
  • Adding some sort of warnings for uses of return that are likely to be confusing (like in the move; return (); move example above)

We should also give some thought to how we explain it in the tutorials and other documentation.

Metadata

Assignees

Labels

C-Low Hanging FruitIdeal issue for new contributors.L-CommandsBuilt-in commands (e.g. move, try, if, ...) in the Swarm language.S-Nice to haveThe bug fix or feature would be nice but doesn't currently have much negative impact.Z-DocumentationThis issue is about README or Wikis or Haddock or...Z-User ExperienceThis issue seeks to make the game more enjoyable to play.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions