Frequently Asked Questions

Everything you need to know about the Kit programming language. Can't find the answer you're looking for? Check out our documentation or join the community.

General Questions

What is Kit?

Kit is a functional programming language that combines the expressiveness of Clojure-style syntax with the safety of Hindley-Milner type inference. It features an effect system for tracking side effects, native compilation via Zig, and a dual-backend architecture with both an interpreter and compiler.

Why was Kit created?

Kit exists because I've spent most of my career thinking about programming languages — and wanting one that felt right.

I'm a polyglot programmer who has worked with over 50 programming languages, and I've long been fascinated by language design and parsing. Early on, books like Writing Compilers and Interpreters and How to Create Your Own Freaking Awesome Programming Language shaped my desire to build my own language. In 2006, I put those ideas into practice by building a domain-specific language for an internal enterprise product, which was successfully used in production.

Since then, I've wanted to design my own “dream” language. With the emergence of large language models, that finally became feasible. Kit was built through an iterative, LLM-assisted process—switching tools when one stalled, refining ideas as implementation progressed, and even changing the underlying systems language from Rust to Zig. After four months of focused work, Kit emerged as the language I had been aiming toward for years.

What languages inspired Kit's design?

Kit was built on the shoulders of giants. It was inspired, in varying degrees, by: Clojure, Crystal, F#, Gleam, Go, Haskell, Lua, Ocaml, Odin, Pony, Python, Roc, Ruby, Rust, V, and Zig.

See the Language Comparison for more details.

Why the name Kit?

When the language was being designed, the first LLM utilized, ChatGPT, randomly generated 🪁 "Kite" as a name for the language. Not being satisfied with the name, the last letter "e" was dropped to create the name Kit.

Later, the Kit fox was chosen as the mascot for the language.

Who designed Kit's logo?

Google's Nano Bannana designed the original, unreleased, logo for Kit.

The final logo was designed by Brand Pulse.

What makes Kit different from other functional languages?

Kit stands out in several ways:

  • Effect System: Track side effects at the type level, knowing exactly what your functions do (pure computation, I/O, network calls, etc.)
  • Dual Backend: Run code instantly with the interpreter or compile to native binaries via Zig
  • Batteries Included: 68 packages for databases, web, graphics, and more are available out of the box
  • Helpful Errors: Rust-quality error messages with "Did you mean?" suggestions

See the Language Comparison for more details.

Who is Kit designed for?

Kit is designed for developers who want the safety and expressiveness of functional programming without sacrificing performance or tooling. It's great for:

  • Building reliable backend services and APIs
  • Data processing and analytics pipelines
  • System programming where safety matters
  • Learning functional programming with helpful guidance
What is Kit's design philosophy?

Kit is built around several core principles:

  • Functional First: Immutable by default, first-class functions, and pattern matching are central to the language
  • Type Safety Without Verbosity: Hindley-Milner type inference provides full static typing with parametric polymorphism, without requiring explicit annotations
  • Explicit instead of Implicit: Explicitness is preferred over implicitness, with clear and concise syntax that avoids unnecessary complexity. In some cases, pragmatism is preferred over purity, when a Developer expects certain constructs to be available (e.g., println aliases to Stdout.write-line).
  • Convention over Configuration: Kit strives to provide sensible defaults and conventions, reducing the need for explicit configuration. Developers can override these conventions when necessary. Reference: Convention over Configuration
  • Dual Execution Model: The interpreter (kit run), and REPL (kit repl), enables rapid development, while the compiler (kit build) produces optimized native binaries via Zig - both must produce identical output
  • Developer-Friendly Errors: Error messages should be helpful and actionable, never exposing raw implementation details
  • Batteries Included: A comprehensive standard library with numerous built-in functions and 68 packages for databases, web, graphics, and more
  • Consistent Conventions: Boolean-returning functions end with ? (e.g., empty?, has-key?), identifiers use kebab-case
Is Kit production-ready?

Kit is currently at version 2026.1.13. While it's feature-complete for many use cases and includes extensive tooling, the language may still evolve. We recommend evaluating it for your specific needs before using in production.

Getting Started

What platforms does Kit support?

Kit currently supports macOS and Linux. Windows support is planned for a future release.

How do I install Kit?

The easiest way to install Kit is using the install script:

# Install latest version
curl -fsSL https://gitlab.com/kit-lang/kit-lang/-/raw/main/install.sh | sh

# Install a specific version
curl -fsSL https://gitlab.com/kit-lang/kit-lang/-/raw/main/install.sh | sh -s -- --version 2026.1.13

This downloads pre-built binaries for your platform (macOS or Linux, x86_64 or ARM64) and installs them to ~/.kit. The script will prompt you to add Kit to your PATH.

Alternatively, you can build from source:

git clone https://gitlab.com/kit-lang/kit-lang
cd kit-lang
zig build

Building from source requires Zig 0.15.2+. For detailed instructions, see the Installation Guide.

Can I try Kit without installing it?

Yes! The Kit Playground lets you write and run Kit code directly in your browser. It's a great way to explore the language, experiment with features, and share code snippets without any setup.

How do I create a new Kit project?

Use the kit init command to create a new project with a kit.toml manifest:

kit init my-project
cd my-project
kit run src/main.kit

This sets up a project structure with package metadata, dependencies, and a starter file.

What's the difference between kit run and kit build?

kit run executes your code using the interpreter, which is great for development and quick iteration. kit build compiles your code to a native binary via Zig for maximum performance.

# Run with interpreter (fast startup)
kit run hello.kit

# Compile to native binary (fast execution)
kit build hello.kit -o hello
./hello

Language Features

What is Hindley-Milner type inference?

Hindley-Milner is a type inference algorithm that can automatically determine the types of expressions without requiring explicit type annotations. This means you get the safety of static typing without the verbosity:

# No type annotations needed - Kit infers everything
add-five = fn(x) => x + 5
# Kit infers: add-five : Int -> Int

result = map add-five [1, 2, 3]
# Kit infers: result : List Int
What is the effect system and why should I care?

Kit's effect system tracks what side effects your functions can perform. This helps you reason about your code and catch bugs at compile time:

# Pure function - no side effects
double = fn(x) => x * 2
# Effect: Pure

# Function with I/O effect
greet = fn(name) => println "Hello, " ++ name
# Effect: IO

The effect system prevents accidental side effects and makes testing easier since pure functions are predictable and isolated.

How does pattern matching work in Kit?

Pattern matching lets you destructure data and handle different cases elegantly. Kit ensures you handle all possible cases at compile time:

type Result a b = Ok a | Error b

handle = fn(result) =>
  match result
  | Ok value -> "Success: " ++ to-string value
  | Error msg -> "Failed: " ++ msg

# List pattern matching
first = fn(list) =>
  match list
  | [x | _] -> Some x
  | [] -> None

Kit also provides match macros for common pattern matching scenarios. These include is for boolean pattern checks, as for extracting values with defaults, and guard for early returns when patterns don't match. Match macros reduce boilerplate and make your intent clearer. See the Pattern Matching Guide for more.

Does Kit support object-oriented programming?

Kit is primarily a functional language and doesn't have traditional classes or inheritance. Instead, it uses:

  • Algebraic Data Types (ADTs): Define data structures with sum and product types
  • Protocols: Define interfaces that types can implement (similar to Clojure protocols or Haskell typeclasses)
  • Records: Named collections of fields for structured data

This approach provides many benefits of OOP (polymorphism, encapsulation) while avoiding common pitfalls (fragile base classes, complex inheritance hierarchies).

How do I handle errors in Kit?

Kit uses the Result type for error handling instead of exceptions. This makes error paths explicit and ensures you handle them:

safe-divide = fn(x, y) =>
  if y == 0 then
    Error "Division by zero"
  else
    Ok (x / y)

# Chain operations with Result
result =
  safe-divide 10 2
  |> Result.map (fn(x) => x + 1)
  |> Result.unwrap-or 0

See the Error Handling Guide for more.

What do functions ending in '?' and '!' mean?

Kit uses suffixes to indicate what a function does:

  • Question mark (?): Functions that return a boolean. These are predicates that test a condition.
  • Exclamation mark (!): Functions that either perform assertions, mutate data in place, or have side effects. The ! warns that something unusual is happening.
# Predicate functions end with ?
List.empty? []           # => true
Map.has-key? "name" user # => true
String.starts-with? "kit" "k"  # => true

# Assertion functions end with !
test "math works"
  assert-eq! (2 + 2) 4
  assert-true! (is-even? 10)

# Mutating functions end with ! (transient data structures)
t = PVec.transient vec
PVec.append! t 42       # mutates t in place
PMap.insert! m "key" val # mutates m in place

This convention makes code more readable by signaling intent at a glance. When you see empty?, you know it returns a boolean. When you see !, you know something effectful is happening—either an assertion that can fail or a mutation of data.

Concurrency

How does Kit handle concurrency?

Kit avoids the colored function issue by providing the following concurrency primitives:

  • Actors: Pony-inspired lightweight actors with lock-free mailboxes and a work-stealing scheduler
  • Channels: High-performance lock-free channels (SPSC, MPSC, unbounded) for Go-style communication

Tooling

What tools does Kit provide?

Kit includes a complete toolchain:

  • kit init - Initialize new projects
  • kit run - Run code with the interpreter
  • kit build - Compile to native binaries
  • kit check - Type check without running
  • kit test - Run tests
  • kit dev - Run development workflow (format, check, test)
  • kit format - Format source code
  • kit lsp - Language Server Protocol for editor integration
  • kit install - Install dependencies
  • kit cache - Manage package cache

See the CLI Reference for details.

How do I manage dependencies?

Dependencies are declared in kit.toml and can come from Git repositories or local paths:

[package]
name = "my-app"
version = "1.0.0"

[dependencies]
kit-json = { git = "https://gitlab.com/kit-lang/kit-json", tag = "v1.0" }
kit-csv = { path = "../kit-csv" }

Then run kit install to fetch dependencies.

Is there IDE/editor support?

Yes! Kit includes a built-in Language Server (kit lsp) that provides rich editor features:

  • Autocomplete with type information
  • Hover documentation and type signatures
  • Go to definition and find references
  • Real-time diagnostics and error highlighting
  • Document symbols and workspace search
  • Rename refactoring
  • Semantic syntax highlighting
  • Inlay hints for inferred types

Official extensions are available for popular editors:

The LSP also works with Neovim, Helix, Emacs, and any editor that supports the Language Server Protocol. See the LSP documentation for setup instructions.

How do I write tests in Kit?

Kit has built-in testing support. Define test blocks directly in your code:

test "addition works correctly"
  assert-eq! (add 2 3) 5
  assert-eq! (add -1 1) 0

test "list operations"
  xs = [1, 2, 3]
  assert-eq! (length xs) 3
  assert-true! (contains? 2 xs)

Run with kit test src/tests.kit. For property-based testing, use the kit-quickcheck package.

Comparisons

How does Kit compare to Haskell?

Kit shares Haskell's Hindley-Milner type inference and focus on purity, but differs in several ways:

  • Kit uses Clojure-style syntax instead of Haskell's ML-style syntax
  • Kit tracks effects explicitly rather than using monads
  • Kit compiles to native code via Zig instead of GHC
  • Kit prioritizes practical tooling and batteries-included libraries

See the Language Comparison for more details.

How does Kit compare to Clojure?

Kit borrows Clojure's expressive syntax and functional style but adds static typing:

  • Kit has static types with inference; Clojure is dynamically typed
  • Kit compiles to native binaries; Clojure runs on the JVM
  • Kit uses an effect system; Clojure allows side effects anywhere
  • Both share a focus on immutable data and functional programming

Kit's pipes |> (data-first) and |>> (data-last) were inspired by Clojure's thread-first -> and thread-last ->>.

See the Language Comparison for more details.

How does Kit compare to Rust?

Both Kit and Rust prioritize safety, but take different approaches:

  • Kit uses garbage collection; Rust uses ownership/borrowing
  • Kit is purely functional; Rust is multi-paradigm
  • Kit tracks effects; Rust tracks memory safety
  • Kit aims for expressiveness; Rust aims for zero-cost abstractions

Kit is inspired by Rust's error messages and tooling quality.

See the Language Comparison for more details.

How does Kit compare to Gleam?

Kit and Gleam share similar goals (friendly functional programming with great tooling) but differ in implementation:

  • Kit compiles to native code via Zig; Gleam targets Erlang/JavaScript
  • Kit has an effect system; Gleam does not
  • Kit uses Clojure-style syntax; Gleam uses Rust-style syntax
  • Both prioritize helpful error messages and developer experience

See the Language Comparison for more details.

Are there performance benchmarks for Kit?

Yes! The kit-benchmarks repository contains performance benchmarks comparing Kit against other mainstream programming languages. These benchmarks help you evaluate Kit's runtime performance for various workloads and see how it stacks up against languages like Rust, Go, and others.

Community & Contributing

How can I contribute to Kit?

We welcome contributions of all kinds:

  • Report bugs or suggest features on GitLab
  • Improve documentation or write tutorials
  • Contribute to the compiler, standard library, or packages
  • Help answer questions in the community forums

Check out the CONTRIBUTING.md file in the repository for guidelines.

Where can I get help with Kit?

Several resources are available:

Is Kit open source?

Yes, Kit is fully open source. The compiler, standard library, and all official packages are available on GitLab.