https://github.com/xandkar/nomenclature
Naming things
https://github.com/xandkar/nomenclature
Last synced: 5 months ago
JSON representation
Naming things
- Host: GitHub
- URL: https://github.com/xandkar/nomenclature
- Owner: xandkar
- License: mit
- Created: 2014-09-06T20:58:56.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-03T21:41:27.000Z (almost 11 years ago)
- Last Synced: 2024-10-19T03:06:37.364Z (about 1 year ago)
- Homepage:
- Size: 157 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Nomenclature
============
How to name things?
### External data source
#### Access
- `fetch` Read: file, object from database
- `store` Write: file, object to database
### Object
#### Construct unique(ish)
Not (easily) reproducible, such as UUIDs, random sequences.
- `new`
#### Construct mutable
- `create`
### Construct immutable
- `cons`
### Access
- `get_[..]`
- `set_[..]`
### Collection
#### Construct mutable
- `create`
### Construct immutable
- `empty`
#### Access K/V (including indexed)
- `get`
- `set`
#### Access set
- `add`
- `remove`
- `is_member`
- `union`
- `diff`
#### Access queue (FIFO)
Which pair is better?
| Pair | Pros | Cons |
|----------------------|------------------------------|------|
| `enqueue`, `dequeue` | explicit, suggest fair order | long |
| `in`, `out` | short, intuitive, same words as in order spec acronym | _may_ also mean out of order manipulations |
| `add`, `remove` | intuitive, consistent with set accessors | a bit longer than in/out |
#### Access stack (LIFO)
- `push`
- `pop`
Why differentiate between LIFO and FIFO accessors? The should ideally be uniform.
### Traverse sequence
- `iter`
- `map`
- `filter`
- `fold`