Civet: A Superset of TypeScript
What Civet Is Trying to Be
- Superset of TypeScript that adds new syntax and quickly adopts TC39 proposals.
- Aims to be a playground for JS/TS language ideas while preserving TS tooling and allowing “eject” back to TS.
- Claims most features are optional; plain TS should compile as-is.
Comparisons to CoffeeScript and Prior “Guest Languages”
- Many see Civet as “CoffeeScript for TypeScript” (including the name pun).
- Some praise CoffeeScript’s historical role in pushing JS forward (arrow functions, destructuring, classes, etc.) and hope Civet can do the same as a de‑facto research language.
- Others recall CoffeeScript migrations as painful, calling it a dead end that made JS quirks harder to reason about and encouraged footguns.
- Concern that guest languages tend to diverge from their host ecosystems unless they become platforms of their own.
Syntax, Readability, and Ergonomics
- Fans like: significant indentation, “everything is an expression”, pipe operators, pattern matching, JSX improvements, list/for comprehensions, dedented multiline strings.
- Critics see the syntax as too terse, “write‑only”, and optimized for typing speed over readability and long‑term maintenance.
- Particular controversy over:
- Optional parentheses and brackets.
- Implicit returns plus “everything is an expression”.
- Custom infix operators like
value min ceiling max floor.
- Some like indentation-based syntax (Python/YAML/GDScript parallels); others strongly prefer explicit braces for clarity and tooling (selecting scopes, avoiding subtle bugs).
Types, Tooling, and Runtime Semantics
- Civet relies on TS for type checking; authors argue types mitigate some CoffeeScript-style pitfalls (implicit returns, terse pipelines).
- Tooling: VS Code, bundlers, ESLint plugins exist but are acknowledged as imperfect.
- Debugging/transpilation: source maps are assumed; some worry about performance or semantic gaps when building another layer atop TS.
Adoption, Risk, and Use Cases
- Enthusiasts see Civet as great for personal projects, fast experimentation, or trying out future JS/TS features early.
- Many commenters would not adopt it in production or team settings due to added cognitive load, inconsistent styles, and migration risk if proposals evolve or are rejected.
- Some argue JS/TS should instead gain a few key features directly (pattern matching, pipelines, comprehensions, better type ergonomics) rather than spawning new surface syntaxes.