Why pin
Choose the tool that fits the work
pin is for teams that read a lot of code and want the compiler to explain its mistakes. TypeScript is a mature tool with a large ecosystem. This page compares the two, using only what the repository shows.
The problem pin targets
Compile errors can be long. Code can carry more punctuation than the idea it expresses. A reader must decode a line before judging it. pin takes a different path: fewer spellings, a written test for each design choice, and errors that name the line and, often, the fix.
The design test
Every pin proposal must pass four questions. They come from section 1 of the spec.
- Can a reader understand each line without a lookup table?
- Is there exactly one spelling for this idea?
- Does the code say what it means?
- Does an error message tell the writer what to do next?
pin and TypeScript
| Question | TypeScript | pin |
|---|---|---|
| Output | JavaScript | TypeScript, with source maps and .d.ts files |
| Immutable by default | No. const protects a binding, not a value. |
Yes. mut allows a change. |
| Compile errors | Errors may be long or hard to read. | Each message names the line. Many also name the fix. |
| Spellings for one idea | Often more than one | One spelling, enforced by the spec |
| Editor support | Mature, from many editors | None yet |
| Ecosystem | npm and the TypeScript community | npm through the TypeScript output |
| Maturity | Years of production use | Early. See the status page. |
When pin fits
- A team reads more code than it writes, and reviews often stall on syntax.
- The team wants compile errors that name the line and, where possible, the fix.
- The team can build from source and accept an early language.
- The project can use the TypeScript output directly.
When TypeScript fits better
- The team needs editor support today.
- The project depends on a library that only works well with TypeScript tooling.
- The team needs a long track record before it adopts a language.
What pin does not have yet
- No editor extension and no language server.
- No benchmark that compares compile time with TypeScript.
- No published users to cite.
- No confirmed package publication for
@pin-langpackages.
The status page lists what is tested and what is not.