Skip to content

Revisit the spacing in binary operators #88

@ronisbr

Description

@ronisbr

Hi!

Sometimes, when writing large equations, the rule of adding spacing to all binary operators can lead to a very verbose text. Compare, for example:

aux_U += P[n + 1, m + 1] * (C[n + 1, m + 1] * cos_mλ + S[n + 1, m + 1] * sin_mλ)
aux_U += P[n+1, m+1] * (C[n+1, m+1]*cos_mλ + S[n+1, m+1]*sin_mλ)

IMHO the latter is much more readable and understandable because the spacing is used to separate the factors.

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