Skip to content

Commit ab75018

Browse files
committed
remove ts section
1 parent f068276 commit ab75018

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

pages/docs/manual/v12.0.0/introduction.mdx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,4 @@ The JavaScript ecosystem is very reliant on dependencies. Shipping the final pro
5353

5454
- Function- and module-level code elimination is facilitated by the well-engineered type system and purity analysis.
5555
- At the global level, ReScript generates code that is naturally friendly to dead code elimination done by bundling tools such as [Rollup](https://github.com/rollup/rollup) and [Closure Compiler](https://developers.google.com/closure/compiler/), after its own sophisticated elimination pass.
56-
- The same applies for ReScript's own tiny runtime (which is written in ReScript itself).
57-
58-
## Comparison to TypeScript
59-
60-
We respect TypeScript very much and think that it's a positive force in the JavaScript ecosystem. ReScript shares some of the same goals as TypeScript, but is different enough regarding some important nuances:
61-
62-
- TypeScript's (admittedly noble) goal is to cover the entire JavaScript feature set and more. **ReScript covers only a curated subset of JavaScript**. For example, we emphasize plain data and functions over classes, clean [pattern matching](pattern-matching-destructuring.md) over fragile `if`s and virtual dispatches, and [proper data modeling](variant.md) over string abuse.
63-
- TypeScript's type system is robust and complex, pitfalls-ridden, potentially requires tweaking, sometimes slow, and requires quite a bit of noisy annotations that often feel like manual bookkeeping rather than clear documentation.
64-
- Migrating to TypeScript is done "breadth-first," whereas migrating to ReScript is done "depth-first." You can convert your codebase to TypeScript by "turning it on" for all files and annotate here and there; but how much type safety did you gain? How do you measure it? Type errors can still slip in and out of the converted pieces. For ReScript, our interop features draw clear boundaries: there's pure ReScript code, and there's JS interop code. Every piece of converted ReScript code is 100% clean. You'd convert file by file and each conversion increases your safety monotonically.
56+
- The same applies for ReScript's own tiny runtime (which is written in ReScript itself).

0 commit comments

Comments
 (0)