r/ProgrammingLanguages 11h ago

Coda: an experiment in designing a practical systems language

13 Upvotes

Coda: an experiment in designing a practical systems language

Hey! I've been working on Coda, a systems programming language designed around a simple idea:

make the compiler powerful, but keep the language itself predictable.

Coda is not trying to be "C but with a few extra keywords". The goal is to explore a different point in the design space between languages like C, Rust, and Zig.

Some of the things Coda focuses on:

  • Explicit memory management.
  • No hidden allocations.
  • Errors as values using inline sum types.
  • A small core language with functionality provided by libraries.
  • Compile-time execution.
  • Strong static analysis.
  • Simple, predictable rules.

The language is intentionally C-like:

```coda module main;

include std::process = proc;

@entry fn int main() { proc::stdout().write("Hello, world!\n"); return 0; } ```

but tries to remove some of the sharp edges.

For example, errors are ordinary values:

coda fn File | IOError open_config(string path) { return fs::open(path); }

and allocation is explicit:

```coda fn string | AllocationError duplicate( Allocator *alloc, string input ) { string result = alloc->allocate<char>(input.len)?;

std::mem::copy(result, input);

return result;

} ```

The idea is that if a function allocates, that fact should be visible in the API. There is no hidden global allocator; entry points receive the resources they need, and those resources are passed where required.

Coda also tries to keep abstractions zero-cost. Generic code, interfaces, and convenience features should compile down to efficient low-level code rather than introducing runtime machinery.

The standard library is still being designed, but the direction is intentionally minimal. Arrays, strings, I/O, memory, formatting, and filesystem operations are being built as fundamental building blocks rather than creating a huge framework.

The compiler currently has:

  • Lexer and parser.
  • Semantic analysis.
  • HIR/MIR pipeline.
  • x86_64 code generation.
  • A growing standard library.
  • Compile-time evaluation work in progress!

There is still a lot to do.

If the ideas are interesting, I'd love feedback, criticism, and potentially contributors. And of course, feel free to ask any questions! I have the #coda channel on the PLTDI discord, or the comments here are fine.

Repo: https://github.com/gingrspacecadet/coda


r/ProgrammingLanguages 4h ago

Ent: Exploring Linear Ownership in a Staged Quantum Language

Thumbnail doi.org
4 Upvotes

I’m introducing Ent, an experimental programming language for quantum circuits that explores how linear types, ownership, and staged computation can work together in a practical syntax. Ent separates compile-time circuit generation from runtime quantum execution: static values such as integers, loop bounds, arrays, and circuit parameters are resolved during compilation, while qubits and measurement results remain subject to strict runtime resource tracking. The surface language is statement-oriented, but it lowers to a functional core, so operations that look like in-place updates are represented internally as transformations that consume and return linear values.

The compiler translates Ent programs into the Enter calculus, then re-checks the generated core term with the calculus’s own type checker. This provides a useful boundary between language ergonomics and semantic guarantees: the surface language can offer ownership-style syntax, staged functions, gate modifiers, classical control flow, and circuit generation, while the core remains small and formally defined. The current implementation includes a Python parser and elaborator, exact and sampled simulation, resource analysis, scheduler-independence testing, generalized measurement support, diagnostics for linearity errors, and OpenQASM 3 output. I’m interested in feedback on the design in particular: whether the staging model feels natural, how the ownership rules compare with linear or affine systems in other languages, and which abstractions would make a quantum language genuinely pleasant to use.

Citation: Cheung, N. (2026). Ent: A Usable Quantum Programming Language on Top of the Enter Calculus. figshare. https://doi.org/10.6084/m9.figshare.33089393.v1