hn.today

ReScript 12 (2025)

rescript-lang.org9 points1 comments
Screenshot of ReScript 12 (2025)

ReScript 12 is a major release that modernizes the compiler, tooling, and runtime with a rewritten build system, a modular runtime package, and a suite of ergonomic language features aimed at real-world codebases. The new build system tracks dependencies more precisely, reduces unnecessary recompilation, and supports incremental workflows across monorepos. The standard library is consolidated into an internal Stdlib included with the compiler, shrinking external dependencies. Distribution moves to ESM-first packages and platform-specific binaries to reduce install size. Teams must plan migrations because several breaking changes accompany the improvements, and a migration guide plus codemods are provided.

Language and ergonomics changes include unified arithmetic operators that work across int, float and bigint (and allow + for string concatenation), F#-style bitwise and JavaScript-style shift operators, dictionary literals that compile to plain objects with pattern-matching support, nested record types, variant pattern spreads, JSX preserve mode, function-level @directive attributes, and JavaScript regex literals. An experimental let? unwrapping syntax is opt-in. Runtime modules were split into @rescript/runtime and many APIs renamed from Exn to OrThrow; JSX v4 is required and several OCaml compatibility helpers are deprecated, with tooling to assist automated fixes.

Read on rescript-lang.org1 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.