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

doc: standard library design principles #6974

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TwoFX
Copy link
Member

@TwoFX TwoFX commented Feb 6, 2025

This PR adds a (currently very short) list of best practices that can be used to record API design decisions for the standard library.

@TwoFX TwoFX added the changelog-doc Documentation label Feb 6, 2025
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc February 6, 2025 13:10 Inactive
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc February 6, 2025 13:18 Inactive
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Feb 6, 2025
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 07c880f7ff1b3490e4de60e561dbe21fa7a833dc --onto b01ca8ee237a1b3c299384e73ad79d424e216a84. (2025-02-06 13:42:59)


> **Put the "more constant" variable on the right-hand side of a comparison statement.**

The idea behind this convention is to be consistent with intuitive usage (for example, most people are more likely to write `l.find? (· == 1)` than `l.find? (1 == ·))`).
Copy link

Choose a reason for hiding this comment

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

Suggested change
The idea behind this convention is to be consistent with intuitive usage (for example, most people are more likely to write `l.find? (· == 1)` than `l.find? (1 == ·))`).
The idea behind this convention is to be consistent with intuitive usage (for example, most people are more likely to write `l.find? (· == 1)` than `l.find? (1 == ·)`).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-doc Documentation toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants