Esc
Start typing to search...

Frequently Asked Questions

General

What is Keel?

Keel is a programming language designed for data science, statistical workflows, and scalable computation. It features:

  • Strong static typing with inference
  • Immutability by default
  • Pattern matching
  • A register-based bytecode VM
  • Clean, readable syntax inspired by Elm and ML

Why create another programming language?

Keel aims to bring type safety and data contracts to data science workflows. It emphasizes:

  • Catching errors at compile time rather than runtime
  • Clear, actionable error messages with "did you mean?" suggestions
  • Excellent tooling out of the box (LSP, formatter, REPL)
  • A Polars-backed DataFrame library with compile-time type checking

What can I build with Keel?

Keel is designed for:

  • Data processing and analysis pipelines
  • Statistical workflows and reporting
  • ETL and data transformation
  • Scripts and automation
  • Command-line tools

Is Keel production-ready?

Keel is currently in alpha (v0.0.6). It's suitable for experimentation and small projects, but the language and APIs may change. We recommend waiting for 1.0 for production use.

Language

How does Keel help with data quality?

Keel's type system catches data errors at compile time:

  • Typed variables prevent passing the wrong data type to a function
  • Pattern matching forces you to handle all cases (e.g. Just/Nothing for missing values)
  • Result types make error handling explicit — no silent failures
  • DataFrame contracts ensure column types are validated

Does Keel have null?

No. Keel uses Maybe for optional values:

enum Maybe a = Just(a) | Nothing

This forces explicit handling of missing values — no null pointer exceptions.

How does error handling work?

Keel uses Result for operations that can fail:

enum Result a e = Ok(a) | Err(e)

No exceptions for expected errors. Every function that can fail returns a Result, making error paths visible in the type signature.

Is Keel strict or lazy?

Keel uses strict (eager) evaluation. Values are computed immediately when bound. This makes performance predictable and debugging straightforward.

Does Keel have type classes or higher-kinded types?

No. Keel uses a simpler approach: parametric polymorphism (generics) with type inference. You can define generic types like enum Maybe a = Just(a) | Nothing and the compiler infers concrete types at each usage site.

Tooling

What editors are supported?

Keel provides editor support through a Language Server (LSP) and tree-sitter grammar:

  • Helix: Full support (tree-sitter + LSP) with built-in configuration
  • Neovim: Full support via nvim-treesitter and nvim-lspconfig

See the Editor Setup Guide for configuration instructions.

Is there a package manager?

A package manager is planned but not yet implemented. Keel currently ships with a comprehensive standard library that covers most common needs including List, String, Math, Decimal, Date, Time, Duration, DateTime, IO, HTTP, JSON, DataFrame, Distribution, Table, ValueLabelSet, Result, and Maybe.

How do I format code?

keel fmt

Formatting is opinionated and consistent. Format-on-save is available in Helix and Neovim via the LSP.

How do I run tests?

A built-in testing framework is planned but not yet implemented. See the Testing page for the intended design.

Performance

How fast is Keel?

Keel compiles to bytecode that runs on a register-based VM. For data-intensive workloads, the Polars-backed DataFrame library provides native-speed operations with automatic SIMD and parallel execution.

How is memory managed?

Keel uses garbage collection with a mark-sweep strategy optimised for functional programming patterns (many short-lived allocations). The GC threshold is tunable.

Can Keel handle large datasets?

Yes. The DataFrame library is backed by Polars and supports lazy evaluation of query plans, predicate pushdown, and projection optimisation. DataFrames can read CSV, JSON, and Parquet files (including from remote URLs), and security controls limit row counts and sandbox file access.

Interop

Can Keel call external code?

FFI (Foreign Function Interface) is on the roadmap but not yet implemented. Planned targets include Rust, Python, R, and Julia interop.

Is there JavaScript/WASM support?

WASM compilation is on the roadmap but not yet implemented.

Community

How can I contribute?

See the Contributing Guide. We welcome:

  • Bug reports
  • Documentation improvements
  • Feature proposals
  • Code contributions

Where can I get help?

Is Keel open source?

Yes, Keel is open source under the AGPL-3.0 license. The source code is on Codeberg.

Comparison

How does Keel compare to Python for data science?

Keel catches errors at compile time that Python only finds at runtime. The type system ensures column names, data types, and function signatures are correct before your pipeline runs. The DataFrame library matches Polars performance while adding type-checked column operations.

How does Keel compare to R?

Both target statistical workflows, but Keel adds:

  • Compile-time type checking (no runtime "object of type 'closure' is not subsettable" errors)
  • A modern module system
  • Consistent syntax without R's historical quirks
  • First-class support for Polars DataFrames alongside Date, Time, Decimal, and Distribution types

How does Keel compare to Elm?

Both emphasize helpful error messages and simple syntax, but:

  • Keel targets data science, not web frontends
  • Keel has DataFrames, HTTP, file I/O, and a rich standard library
  • Keel uses run for file-based code organisation instead of Elm's Cmd/Sub model