yesodweb / yesodweb/persistent

Incorrect casing for “ID”

Open
#1,549 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
486
Forks
306
PR merge metrics
No merged PRs in 30d

Description

All implicit generated IDs such as the ID for Foo is generated as FooId. While much of the documentation uses “ID”, the code representation is incorrect casing where “ID” is the standard abbreviation form for identifiers (IDs), not “Id”. Changing this would align other correctly-cased variables in the project like DB (along with uses of IO, UUID, & FromJSON from other libs), but still leaves incorrect cases like Sql instead of SQL for the initialism ‘structured query language’ (where documentation is largely using “SQL”).

What I would expect is the implicit ID for Foo becomes FooID… all fooId columns become fooID.

Moving from ‘ID’ to ‘Id’ is losing valuable casing information & if it weren’t important, we wouldn’t be bothering with upper case letters at all in English (& other languages with bicameral scripts). …It is also a bit Freudian to use “Id”.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name files or tests, so first locate the entry points for implicit ID generation and generated column naming. Assess the impact across the persistence interface and its storage methods, including compatibility with existing FooId and fooId names; done means the agreed ID casing is generated consistently without unaddressed cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.