Canonical guidance

Use when

Avoid

Preferred pattern

type UserID string

Anti-pattern

Explanation: This is tempting because the underlying representation is the same, but the language intentionally makes the new type distinct.

Why

Related pages

Sources