MALDA (programming language)

From HandWiki




Short description: Open-source programming language for agents, web apps and workflows

Template:Draft topics Template:AfC topic

Template:Draft article

MALDA
ParadigmMulti-paradigm: imperative, object-oriented, concurrent
DeveloperAndrea Maldini
First appearedJuly 31, 2026; 22 days ago (2026-07-31)
Stable release
1.0.1 / August 18, 2026; 4 days ago (2026-08-18)
Typing disciplineDynamic, with optional type hints
Platform.NET 8
OSWindows, Linux, macOS (Desktop IDE is Windows-only)
LicenseDual MIT or Apache License 2.0; separate runtime exception for compiled programs
Filename extensions.malda
Websitegithub.com/amaldini/maldalang
Major implementations
MALDA interpreter and C# / JavaScript transpilers

MALDA (Multi Agent Language with Development Automation) is an open-source programming language and toolchain for writing programs that combine ordinary control flow with large language model prompts, software agents, HTTP services and long-running workflows.[1] Source files use the .malda extension. The language is dynamically typed at run time; optional type annotations are used by the editor and, in transpile/publish mode, as a compile-time check rather than as a full static type system.[1][2]

Programs may be executed by a tree-walking interpreter, transpiled to C# and built as a .NET executable, or compiled to a JavaScript subset for the browser.[3] The reference implementation is written in C# on .NET 8 and is dual-licensed under the MIT License or Apache License 2.0, at the user's option.[1]

History

MALDA was designed and is maintained by Andrea Maldini, a business-software developer working in C#, Java and VB.NET, as a first language implementation rather than as a research compiler project.[1] Public project materials describe the work as an attempt to treat prompts, tools, agents, HTTP endpoints and durable workflows as grammar instead of library glue, after first trying the same ideas as libraries.[4] Those materials also cite Geoff Huntley's "Ralph Wiggum" agent loop and Huntley's esoteric language cursed as the prompt to attempt a language at all, not as a syntactic parent.[4]

A draft of the Tier 0 language specification was dated 4 June 2026.[2] The open-source core was first published on GitHub on 31 July 2026 as version 0.1.0, with a runtime, C# and JavaScript transpilers, command-line interface, IDEs, language server and VS Code extension.[5][6] The specification was marked Final 1.0 on 12 August 2026.[2] Toolchain version 1.0.0, tagged 17 August 2026, aligned the CLI and Desktop IDE version numbers with that specification and made type-hint errors refuse emit on transpile and publish.[7] Version 1.0.1 followed on 18 August 2026 as a patch release; it is not a new specification line.[8]

The public repository is the language core. Separate product applications built on MALDA are kept out of that tree.[1]

Design

MALDA is a general-purpose language with a C-like surface: var bindings, function declarations (fn and def are syntax errors), classes, exceptions, match expressions, sum types, async/await, and a namespaced standard library under io, math and str among others.[2][1] Functions are declared at top level; nested function statements are not part of the language.[2] Composition across files uses parse-time include or runtime import / selective import { … } from.[4]

The project's stated design split is that relatively stable ideas (prompt templates, actor message passing, workflow step/retry/compensate) are syntax, while model providers, tool protocols and model names remain in the library layer.[4] An earlier chain keyword for LLM pipelines was removed in favour of ordinary functions and the pipe operator.[4]

Type system

Run-time values have a single kind (integer, float, string, boolean, null, array, object, function, class, variant, task, actor, or actor reference).[2] Integers are 32-bit signed and overflow throws; floats are IEEE doubles; strings are UTF-16.[2]

Type annotations such as var n: int = 0 and function add(a: int) -> int are optional. They feed the language server and desktop editor, which report mismatches as errors by default; they are not enforced by the interpreter at run time.[1][2] malda compile --mode transpile and publish refuse to emit when those errors are present, unless --lenient-types is passed.[7] schema declarations and validate check JSON-shaped data; sum types and match cover tagged unions.[2]

Prompts, agents and tools

A prompt is a named declaration with untyped parameters and interpolated role sections. Calling it without await returns the rendered template (usable without an API key); calling it with await sends it to a configured model. A -> SchemaName binding validates model JSON against a declared schema.[1] Functions may be exposed as agent tools with @Tool or over the Model Context Protocol with @MCPTool.[4]

LLM features use OpenRouter when an API key is configured, otherwise a small local GGUF model (Qwen2.5-0.5B) downloaded on first use as an offline fallback.[1]

Web and user interface

HTTP APIs and pages are declared with decorators (@GET, @POST, @PAGE, @AIPAGE and similar) on host objects such as HttpServer and RestServer.[1] Server-driven ui.* trees are hosted by a separate UI host runtime. This web stack is a language feature and is distinct from the browser-based MALDA IDE.[3]

Actors

Actors are a Tier 0 construct: actor declarations, spawn, send, receive and self.[2] Message handlers are written with on over private state.[4]

Workflows

Durable workflows are blocks of statements using reserved words including step, retry, compensate, approval, wait and timeout.[4] Recovery is step-level memoization to a local SQLite file (./.malda/workflows.db): a completed step returns its persisted JSON-shaped result instead of re-running.[4] Non-deterministic and side-effecting built-in names are refused outside step by a fixed deny-list; the implementation is a single-writer, single-machine store, not a clustered workflow engine.[4][1]

Example

The following program prints a greeting:[9]

io.print("Hello, World!");

A characteristic prompt example binds a template to a schema. Without await, the call is a rendered template; validate performs the same check that await would apply to model JSON:[1]

schema Review {
    summary: string;
    issues: string[];
}

prompt codeReview(code, language) -> Review {
    system: "You are an expert reviewer of {language}.",
    user: "Review this {language} code:\n\n{code}"
}

var rendered = codeReview("function add(a, b) { return a + b; }", "javascript");
io.print(rendered.user);

Implementation

The reference toolchain is implemented in C# with a hand-written recursive descent parser. The pipeline is lexer, parser and abstract syntax tree, then one of three backends: the interpreter, a C# transpiler, or a JavaScript / progressive web app transpiler.[3][4] Language intelligence (completions, diagnostics, hover) is shared across the Desktop IDE, Web IDE and language server.[3]

The three backends are not equivalent. The JavaScript path is a documented browser subset: it does not include agents, HTTP servers or workflows.[1] C# transpile covers the built-in registry for shipping .NET executables; interpreted and transpiled programs are compared on a curated set of examples for matching standard output.[3]

The standard library is large (on the order of three hundred named built-ins in the project registry), covering strings, collections, files, HTTP, JSON, SQL, graphs and process control, with .NET interop as an escape hatch. There is no public package registry comparable to npm or crates.io.[4]

Tooling

Tool Role
malda CLI Interpret, compile/transpile, templates (malda new), workflow commands
Desktop IDE Full Windows reference environment (WPF)
Web IDE Browser learning playground (Blazor / Monaco); not feature-parity with Desktop
malda-lsp Language Server Protocol host
malda debug-adapter Debug Adapter Protocol for interpret-mode debugging (separate from the language server)
vscode-malda Visual Studio Code / Cursor extension

Self-contained release archives are published for Windows (CLI and Desktop IDE) and Linux (CLI).[1] The HTML reference manual is published in English (canonical) and Italian.[1] The repository also ships a compact language pack under docs/llm/ intended for coding agents that have not seen MALDA in training data.[1]

Licensing

The core (runtime, compiler, IDEs, language server, reference manual and examples) is dual-licensed MIT OR Apache-2.0.[1] Because the toolchain copies runtime helpers into compiled output, a runtime exception states that this does not impose attribution obligations on user programs.[10] The name "MALDA" is asserted as a trademark of Andrea Maldini and is not granted by either copyright licence.[11] There is no contributor licence agreement.[1]

See also

References

Category:Dynamically typed programming languages Category:Concurrent programming languages