jesseduffield / jesseduffield/OK

Suggestion: require parenthesis where operator precedence is non-standard

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
624
Forks
22
PR merge metrics
No merged PRs in 30d

Description

I noticed that the order of precedence for operators doesn't exactly conform to the guidelines that the rest of language follows: while in most places the compiler requires the programmer to be explicit (e.g. `pack` comments), precedence of operators is a (arbitrary?) choice of the compiler that will still confuse people who are used to excusing Aunt Sally.

What I would expect from _Ok?_ is to raise a compiler error on expressions such as `a + b * c`, and require that the programmer either changes the order, or adds parentheses.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.