MLisp language.

A modern Lisp variant written in C++, designed primarily as the extension language for MEdit and also available as a standalone Lisp.

A small language with sharp tools

Readable at a glance.
Expressive under pressure.

MLisp keeps Lisp’s compact syntax and adds practical tools for composing small programs.

01 / Pattern matching

Pull structure apart as you test it.

Map patterns match only the keys you name, binding useful values directly in the successful clause.

response.mlmatch · maps
; extra response fields are fine
(match response
  ({:status :ok :body body}
    (parse body))
  ({:status :error :code code}
    (print "Request failed:" code)
    false))
02 / Keyword lookups

Maps that read like data.

Keywords are values and functions. Call one with a map for a concise lookup, with an optional fallback.

profile.mlkeywords · maps
(def user
  {:name "Ada"
   :role :admin})

(:name user)
; "Ada"

(:theme user "system")
; "system" — the fallback

Development notes

All notes →

Follow the interpreter from its first expressions through tokenization, reading, and evaluation.

The project

The goal of MLisp is to create a new, modern Lisp variant. Its close integration with MEdit guides the language design without limiting it to the editor.

Implementation
C++
Language family
Lisp
Status
In development

Latest note

Implementation notes will be collected as the C++ interpreter develops.

Open development notes →