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
unsafeblocks 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, whichpickle runcompiles and executes in one step. pickle checkparses, resolves, and type-checks a module without running it, andpickle testruns the test items in a module or a directory. See Running programs.
Where to go next
- Quickstart: write and run your first program.
- Installing PickleScript: download
pickle-clifor Linux or Windows. - Language overview: the design of the language itself.
The whole documentation
Getting started
- Quickstart · Installing PickleScript · Running programs · Writing and running tests · The workspace manifest · Editor integration
Language guide
- Language overview · Values and types · Variables and constants · Strings · Functions · Control flow · Pattern matching · Lists and maps · Classes · Structs · Enums · Generics and interfaces · Error handling · Modules and imports · Builtin functions
Standard library
- Standard library overview · Text processing · Collections · JSON · Files and paths · Processes · Threads
Advanced
Reference
