Vapour

A typed superset of the R language.

Vapour is a typed superset of the R programming language.

Vapour transpiles to R, so it works with the whole R ecosystem while adding its own syntax and a type system. The aim is to make R developers more confident in their programs by catching errors such as type mismatches and undefined variables as the code is written, before it runs.

Vapour is in early alpha: the syntax may change and things may break.

Installation

Vapour requires R to be installed. You can install it with Go:

go install github.com/vapourlang/vapour@latest

Prebuilt binaries for Linux, macOS, and Windows are available on the releases page.

Example

let x: char = "hello, world"

# will fail, wrong type
x = NULL

func hello(what: char): char {
  return sprintf("Hello, %s", what)
}

hello("Vapour")

Run a script, or transpile it to R:

vapour -infile=script.vp --run-only
vapour -infile=script.vp

Documentation