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

Expanding on the naming conventions #793

Draft
wants to merge 36 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift click to select a range
5d1c20b
expanding naming conventions
EgbertRijke Sep 21, 2023
18e63c4
separate file for naming conventions
EgbertRijke Sep 21, 2023
efd8af3
separate file for naming conventions
EgbertRijke Sep 21, 2023
d8a9cd6
make pre-commit
EgbertRijke Sep 21, 2023
671b890
Merge branch 'master' of github.com:UniMath/agda-unimath into naming
EgbertRijke Sep 21, 2023
0b4e67b
explaining the naming of underlying objects
EgbertRijke Sep 21, 2023
1f470b1
make pre-commit
EgbertRijke Sep 21, 2023
3d521a8
Update NAMING.md
EgbertRijke Sep 21, 2023
92c28a4
fix broken links
EgbertRijke Sep 21, 2023
f1e82f9
Merge branch 'naming' of github.com:EgbertRijke/agda-unimath into naming
EgbertRijke Sep 21, 2023
d9ee159
sectioning
EgbertRijke Sep 21, 2023
e91cf2e
adding gregor
EgbertRijke Sep 21, 2023
0ab40db
make pre-commit
EgbertRijke Sep 21, 2023
a44bd45
further explaining our naming conventions
EgbertRijke Sep 22, 2023
2b17fa6
make pre-commit
EgbertRijke Sep 22, 2023
1d30aa6
further comments
EgbertRijke Sep 22, 2023
c922269
revised introduction
EgbertRijke Sep 22, 2023
4ac7ec8
update examples
EgbertRijke Sep 22, 2023
cc82fac
updating the general scheme
EgbertRijke Sep 22, 2023
e91085b
incorporating some of Vojtech's comments
EgbertRijke Sep 22, 2023
88a9226
Update NAMING-CONVENTIONS.md
EgbertRijke Sep 22, 2023
74e0697
Update NAMING-CONVENTIONS.md
EgbertRijke Sep 22, 2023
a8bfc8f
Update NAMING-CONVENTIONS.md
EgbertRijke Sep 22, 2023
6f88244
Update NAMING-CONVENTIONS.md
EgbertRijke Sep 22, 2023
fa770b4
make pre-commit
EgbertRijke Sep 22, 2023
633b471
Update NAMING-CONVENTIONS.md
EgbertRijke Sep 22, 2023
bd3ed0b
make pre-commit
EgbertRijke Sep 22, 2023
0b27816
list of common descriptors
EgbertRijke Sep 22, 2023
63a0091
Update NAMING-CONVENTIONS.md
EgbertRijke Sep 22, 2023
1f95642
make pre-commit
EgbertRijke Sep 22, 2023
fdea201
equiv and htpy in the table
EgbertRijke Sep 22, 2023
693cb0f
work
EgbertRijke Sep 23, 2023
1fbc9b9
merge conflicts
EgbertRijke Sep 23, 2023
6006e80
explaining the goals
EgbertRijke Sep 23, 2023
81f66b8
predictability
EgbertRijke Sep 23, 2023
fce34cd
clarify use of
EgbertRijke Sep 23, 2023
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
Prev Previous commit
Next Next commit
further comments
  • Loading branch information
EgbertRijke committed Sep 22, 2023
commit 1d30aa6fc028853d839c561b58bd8227f84e7fa4
27 changes: 15 additions & 12 deletions NAMING-CONVENTIONS.md
EgbertRijke marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 88,7 @@ pattern `[type]-[Namespace]`. One could also consider calling it
the isomorphism is an isomorphism. However, this name does not fit our patterns
in any way, and the addition of `hom` to the name adds no extra useful
information. This situation is common in instances where we omit the `[name]`
part of a name. For instance `[is-category-Category` and `is-ideal-ideal-Ring`
part of a name. For instance `is-category-Category` and `is-ideal-ideal-Ring`
follow the patterns `[type]-[Namespace]` and `[type]-[hypotheses]-[Namespace]`.
EgbertRijke marked this conversation as resolved.
Show resolved Hide resolved

Another class of entries where the naming scheme needs some explanation, is
Expand Down Expand Up @@ -138,14 138,6 @@ library is `Ω`. Therefore, we record the function that transport computes to as
`tr-Ω` and we record the [homotopy](foundation.homotopies.md) that transport is
pointwise equal to `tr-Ω` as `compute-tr-Ω`.

## Abbreviations, and avoiding them

We should also mention that, while abbreviations might seem like a good way to
shorten names, we use them sparingly. They might save a couple of keystrokes for
the author, but in the grand scheme of things, they will likely compromise
readability and maintainability, especially for newcomers and maintainers. We
aim for clarity, not brevity.

## Overview of our naming conventions

- Names are unique; we steer clear of namespace overloading.
Expand Down Expand Up @@ -186,9 178,20 @@ certain thing.

## Naming conventions we try to avoid

- Using Unicode characters in names is entirely permissible, but we recommend
restraint to maintain readability. Just a few well-placed symbols can often
express a lot.
- Abbreviations might seem like a good way to shorten names, but we use them
sparingly. They might save a couple of keystrokes for the author, but in the
grand scheme of things, they will likely compromise readability and
maintainability, especially for newcomers and maintainers. We aim for clarity,
not brevity.

- Using Unicode characters in names is permissible, but we recommend restraint
to maintain readability. Just a few well-placed symbols can often express a
lot. Often, when we introduce mixfix operators, we also introduce full names
for them. We then use the full names for these operators in the naming scheme,
and omit the symbolic notation for anything but the operation itself. For
example, the commutativity of cartesian products is called `commutative-prod`
and not `commutative-×`, and the unit of a modality is called `unit-modality`
and not `unit-○`.
Comment on lines 257 to 258
Copy link
Collaborator

Choose a reason for hiding this comment

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

Although the second example here is also an instance of using a variable in a name, perhaps it still conveys the correct sentiment.


- To enhance conceptual clarity, we suggest names of constructions avoid
referring to variable names. This makes code more understandable, even at a
Expand Down