Skip to content

docs/WorkflowGuidelines.md: remove duplicate rule#240

Open
webwarrior-ws wants to merge 3 commits intotarsgate:masterfrom
webwarrior-ws:code-style-braces-deduplication
Open

docs/WorkflowGuidelines.md: remove duplicate rule#240
webwarrior-ws wants to merge 3 commits intotarsgate:masterfrom
webwarrior-ws:code-style-braces-deduplication

Conversation

@webwarrior-ws
Copy link
Copy Markdown
Contributor

About braces around single statement.

This should have been done in [1].

[1] #238

About braces around single statement.

This should have been done in [1].

[1] tarsgate#238
@knocte
Copy link
Copy Markdown
Contributor

knocte commented Apr 15, 2026

Merging this would mean that the list you're editing would become a list of one single item. Obviously we need a better approach here.

Comment thread docs/WorkflowGuidelines.md Outdated
* In general, we prefer verbose code (even if it's longer) than short & clever code. This means:
* We dislike short variable names (if there's some ambiguity on what your variable represents, then choose a longer and more descriptive name).
* In languages that have optional braces for `if/else` statements (e.g. C#, TypeScript), we prefer to add them even if the code block will only contain one line. This way, when the next developer adds more lines to it later it's less work for him and doesn't cause unnecessary git-blame noise.
* In general, we prefer verbose code (even if it's longer) than short & clever code. This means thet we dislike short variable names (if there's some ambiguity on what your variable represents, then choose a longer and more descriptive name).
Copy link
Copy Markdown
Contributor

@knocte knocte Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@webwarrior-ws completely unacceptable

Previous version:

  • Generic statement A.
    • Example of statement A: X.
    • Example of statement A: Y.

Now, if Y is duplicated, it's unacceptable to make the new version say that A equals X. No! X is an example!!!!! A doesn't mean X!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(edited previous comment to replace "B" with "A", there's no B here)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed wording to "For example, "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just bring the new code snippets you cooked in PR238 so they become examples of this now? Please, when programming any feature it's normal that you should always take the fastest path to do it that maintains a reasonable level of quality, but when it comes to docs, we want to highest level of quality even if using the lowest amount of effort. It's not very high effort to put this in a decent way. These are things that are related after all, why keep them separated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand. PR238 is merged so that snippets are already in the document.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't believe you don't understand this man. If I mention PR238, the point of this PR is to redo what you did in PR238 but in the supposed case that you had known that there was already an "optional braces" section in the document.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brough old paragraph with explanation to the snippet sections. Is that what you wanted?

Collapse list, that now has only one item after removal in
previous commit, into single paragraph.
@webwarrior-ws webwarrior-ws force-pushed the code-style-braces-deduplication branch from 198aa89 to fc93fbb Compare April 15, 2026 08:49
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

Successfully merging this pull request may close these issues.

2 participants