TypeScript vs. ReScript vs. F# - a simple comparison of syntax

This page summarizes the projects mentioned and recommended in the original post on dev.to

Sevalla - Deploy and host your apps and databases, now with $50 credit!
Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!
sevalla.com
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. TypeScript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    class Rectangle { readonly height: number readonly width: number constructor(height: number, width: number) { this.height = height this.width = width } add(rec: Rectangle) { return new Rectangle(this.height+rec.height, this.width+rec.width) } } const tallRect = new Rectangle(1, 3) const wideRect = new Rectangle(3, 2) // Usage, chaining: const square = tallRect.add(wideRect).add(wideRect) console.log(square) rec3.height = 20 // TS correctly errors on this. However, the JS would still execute (when run in e.g. https://www.typescriptlang.org/play ) console.log(square)

  2. Sevalla

    Deploy and host your apps and databases, now with $50 credit! Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!

    Sevalla logo
  3. rescript

    ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript.

    Let's compare how 3 languages that compile to JavaScript - TypeScript, ReScript and F# with the Fable compiler - are able to chain immutable data.

  4. ocaml

    The core OCaml system: compilers, runtime system, base libraries

    That's because both ReScript and F# were derived from OCaml, so they also have the powerful Hindley-Milner (H-M) type inference. H-M type inference is also sound, which means you can rely on it (it prevents all type errors it claims to prevent, and doesn't give false negatives, so you can trust that all type checked programs will be correct). That's something you can't take for granted in TypeScript, even with the extra annotations.

  5. F#

    Discontinued Please file issues or pull requests here: https://github.com/dotnet/fsharp (by fsharp)

    Let's compare how 3 languages that compile to JavaScript - TypeScript, ReScript and F# with the Fable compiler - are able to chain immutable data.

  6. Fable: F# |> BABEL

    F# to JavaScript, TypeScript, Python, Rust and Dart Compiler

    Let's compare how 3 languages that compile to JavaScript - TypeScript, ReScript and F# with the Fable compiler - are able to chain immutable data.

  7. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • História sobre usar o JavaScript para programar JavaScript

    4 projects | dev.to | 31 Oct 2022
  • Has TypeScript made you a better developer?

    4 projects | /r/reactjs | 12 Jul 2022
  • From TypeScript to ReScript

    12 projects | news.ycombinator.com | 12 Jan 2022
  • Type systems and type inference

    2 projects | dev.to | 2 Nov 2021
  • Why F# could be the next mainstream programming language (2024-12)

    2 projects | news.ycombinator.com | 8 Aug 2025

Did you know that F# is
the 47th most popular programming language
based on number of references?