Skip to content

Documentation for += #411

@soegaard

Description

@soegaard

This is a response to:
processing/processing-docs#847

Please reconsider.

The operator += combines assigment and addition.
The documentation explains assignment = as:

Assigns a value to a variable. The "=" sign does not mean "equals", but is used to place data within a variable.

Furthermore, the syntax is listed as:

var = value

From the old issue:

Additionally, the use of more technical language such as "identifiers" and "expressions" may be confusing for beginners, who may not be familiar with these terms. We believe that the current syntax is more straightforward and easier to understand for the intended audience.

The words variablename and expression are well-known from math.
As a math teacher of 20 years I can assure you that concepts - not words - confuse beginners.

The use of value += value is confusing since it conflates the concepts of variable and value.
If you are afraid of the word expression how about:

var += value

This matches the convention used in the documentation for assignment.

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