JuliaDiff / JuliaDiff/BlueStyle

Revisit the spacing in binary operators

Open
#88 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
519
Forks
34
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing binary-operator spacing rule in the BlueStyle guide and compare it with the Julia examples in this issue. Done means the guide has a decided spacing convention for large equations and its examples communicate that convention clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.