Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit the spacing in binary operators #88

Open
ronisbr opened this issue May 22, 2021 · 1 comment
Open

Revisit the spacing in binary operators #88

ronisbr opened this issue May 22, 2021 · 1 comment

Comments

@ronisbr
Copy link

ronisbr commented May 22, 2021

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.

@omus
Copy link
Contributor

omus commented May 27, 2021

I would say I find the former easier to read. It's definitely worth calling out this style guide provides guidelines and not rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants