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

Add missing rationale for rule, clarify case being "later" #807

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/pages/docs/style-guide.elm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ very difficult to figure out where variables came from without this.

Always have type annotations on top-level definitions.

Always have 2 empty lines between top-level declarations.
Always have 2 empty lines between top-level declarations. Using twice the
normal gap makes it easier to visually "chunk" together the top-level
declarations at a glance.

Always bring the body of the declaration down one line.

Expand Down Expand Up @@ -88,9 +90,10 @@ We saved vertical lines here, but at the cost of regularity and ease of
modification. If `Literal` ever becomes longer, all arrows must move. If any
branch gets too long, everything needs to come down a line anyway.

Having `case` appear *later* than the actual cases is strongly discouraged. It
should serve as a context clue that makes glancing through code easy, but when
indented in crazy ways, it becomes more difficult to glance through.
Having `case` appear *later* than the actual cases (as in, further to the right)
is strongly discouraged. It should serve as a context clue that makes glancing
through code easy, but when indented in crazy ways, it becomes more difficult to
glance through.


## Types
Expand Down