Back to browse
GitHub Repository

A safer complement of R, the legendary programming language for statistic and datasciences !

132 starsRust

TypR – A typed R that transpiles to idiomatic R via S3 classes

by FabriceHategeki·Mar 6, 2026·1 point·0 comments

AI Analysis

●●SolidBig BrainWizardryNiche Gem

Typed R via monomorphization—clever, but R's permissive culture may reject friction.

Strengths
  • Monomorphization at compile time eliminates runtime overhead while generating readable, native R output that integrates seamlessly into existing projects.
  • Structural typing and generics bring modern type safety to R without forcing functional patterns on a procedural ecosystem.
  • Delivers tangible tooling: binaries, VS Code LSP, and interactive playground—not vaporware.
Weaknesses
  • R's culture prioritizes flexibility and iteration; adding compile-time type checking may feel like friction rather than safety to the core user base.
  • Alpha stage with incomplete standard library and minimal community adoption—viability depends on whether package ecosystem adopts the toolchain.
Target Audience

R data scientists, statisticians, package maintainers wanting type safety

Similar To

Scala for data science · PureScript

Post Description

TypR is a statically typed language written in Rust that compiles down to plain R code using S3 classes. The goal is to bring type safety to R without leaving the ecosystem — the generated output is idiomatic R you can drop into any existing project.

The compiler uses monomorphization to resolve generic types at compile time, so there's no runtime overhead. The type system supports structural typing, interfaces, and generics. It's still in alpha, but here's what's available so far:

GitHub: https://github.com/we-data-ch/typr

Binaries (Windows/Mac/Linux): https://github.com/we-data-ch/typr/releases

Online playground: https://we-data-ch.github.io/typr-playground.github.io/

VS Code extension with LSP: https://marketplace.visualstudio.com/items?itemName=wedata-c...

Docs (WIP): https://we-data-ch.github.io/typr.github.io/

Known limitations: the standard library is minimal so the user need to type some existing functions/variables with signatures, error messages need work, and the LSP is basic. Positron and Neovim support are in progress.

Would appreciate feedback on the type system design or ideas for use cases that would make this useful in practice.

Similar Projects

Developer Tools●●Solid

Lumina – a statically typed web-native language for JavaScript and WASM

Built-in reactive runtime and dual JS/WASM targets challenge React and TypeScript dominance.

WizardryBold Bet
light_ideas
202mo ago

A New Programming Language

Endianness in the type system is clever, but another language in a saturated field.

Niche Gem
kvthweatt
403mo ago