What is PickleScript?

A native, garbage-collected language with C-family syntax, and an honest look at where the toolchain stands today.

vlatest

PickleScript is a general-purpose, natively compiled programming language. It uses C-family syntax with braces, parenthesised conditions and no semicolons, and it combines a garbage collector with an escape hatch into manual memory.

module hello

fn main() {
    let recipient = "world"
    print("Hello, {recipient}!")
}

Design goals

  • Familiar syntax. If you have written C-family code, the surface syntax should not slow you down.
  • Garbage collected by default. Memory is managed for you. Raw pointers and manual allocation are available inside unsafe blocks when you need them.
  • Native code. The toolchain lowers programs through a typed intermediate representation to machine code rather than interpreting them.

The shape of the language

Feature Status
let / var / const bindings Supported
class, struct, enum, interface Supported
Generics, single inheritance, override Supported
Pattern matching with match / case Supported
Optionals (T?, none, ??) Supported
String interpolation Supported
Closures (fn values) Supported
Lists, maps, byte strings Built in
Threads, channels, mutexes std.thread
Processes, pipes, subshells std.process

Where the toolchain stands

PickleScript is version 0.1.0 and under active development.

  • The CLI is pickle-cli. It compiles your program to x86-64 machine code, which pickle run compiles and executes in one step.
  • pickle check parses, resolves, and type-checks a module without running it, and pickle test runs the test items in a module or a directory. See Running programs.

Where to go next

The whole documentation

Getting started

Language guide

Standard library

Advanced

Reference