Skip to main content

MEP 0. Index of Mochi Enhancement Proposals

FieldValue
MEP0
TitleIndex of Mochi Enhancement Proposals
AuthorMochi core
StatusActive
TypeProcess
Created2026-05-08

What is a MEP

A Mochi Enhancement Proposal is a design document that records a decision about the language. It is modeled on the Python PEP process. Every change to the language surface, the type system, the runtime, or the tooling that would benefit from a written record lives as a MEP.

A MEP is the place where we explain what the language does, why it does it that way, and what we would change. The implementation is in the repository. The MEP is the contract.

Status values

StatusMeaning
DraftUnder discussion. Content may change.
ActiveA process MEP that is in effect.
AcceptedApproved. Implementation is in progress or pending.
ProvisionalApproved with a trial period. Behavior may be revisited based on real-world use.
FinalImplemented and stable. Changes require a new MEP.
InformationalDocuments the language as it stands. No proposal embedded.
WithdrawnThe author retracted the proposal.
RejectedThe proposal was not adopted. The MEP stays so the discussion is searchable.
SupersededAn older MEP that has been replaced. The replacement is linked.

Type values

TypeMeaning
Standards TrackAdds, changes, or removes a language feature, type rule, or runtime behavior.
InformationalDescribes the language without proposing change.
ProcessDescribes a process: how we test, how we release, how we write MEPs.

Index

The current series covers the soundness initiative for v0.11.0. Numbering follows the PEP convention: four-digit padded MEP numbers, status and type recorded in each file's header.

The status column reflects the implementation status against main, not the spec drafting status. A MEP that has shipped code in runtime/vm2, compiler2/, runtime/jit/, or tests/types/ is marked Active; the prose may still be refined. The auto-generated index at /docs/mep/ mirrors each file's frontmatter, so the source of truth for any single MEP is its own header.

MEPTitleStatusType
0Index of Mochi Enhancement ProposalsActiveProcess
1LexerInformationalInformational
2GrammarInformationalInformational
3Abstract Syntax TreeInformationalInformational
4Type SystemInformationalInformational
5Type InferenceActiveStandards Track
6Type CheckerInformationalInformational
7SoundnessActiveProcess
8Test StrategyActiveProcess
9Fixture CatalogueInformationalInformational
10Known Gaps and Weakness ReviewInformationalInformational
11Subtyping and VarianceActiveStandards Track
12Parametric PolymorphismActiveStandards Track
13Algebraic Data Types and MatchDraftStandards Track
14Query AlgebraInformationalInformational
15Effects, Mutability, and PurityDraftStandards Track
16Null SafetyDraftStandards Track
17VM Performance Methodology and BaselineActiveProcess
18Bytecode Dispatch in a Go-Hosted VMActiveStandards Track
19Adaptive Specialization and Inline CachesActiveStandards Track
20Value Representation and Allocation DisciplineActiveStandards Track
21Compiler2 and VM2 Co-Design for Maximum Interpreter ThroughputActiveStandards Track
22Baseline JIT via Copy-and-PatchDeferredInformational
23Cross-language Baseline BenchmarksActiveProcess
24VM2 Subsystem Design (Objects, Strings, Structs, Lists, Maps, Closures, GC, Errors)ActiveStandards Track
25VM2 Data Model (Strings, Lists, Maps, Sets, Structs)ActiveStandards Track
26VM2 Data Model Option 1 - Monomorphic + One-Way MigrationDraftStandards Track
27VM2 Data Model Option 2 - Polymorphic + Inline CachesDraftStandards Track
28VM2 Data Model Option 3 - AOT Codegen SpecializationDraftStandards Track
29VM2 Dispatch Strategy - Measured ResultsInformationalInformational
30VM2 JIT Option A - Template / Copy-and-Patch Baseline JITActiveStandards Track
31VM2 JIT Option B - Tracing JIT over Typed LoopsDraftStandards Track
32VM2 JIT Option C - Tiered Method JIT with Type FeedbackDraftStandards Track
33MEP-30 Template JIT - Measured ResultsInformationalInformational
34VM2 Full-Opcode JIT - Lists, Strings, Maps, Sets, StructsActiveStandards Track
35Auto Memory Management for the VM2 Objects TableDraftStandards Track
36Restructure VM2 to Reuse Go's GCDraftStandards Track
37MEP-34 Full-Opcode JIT - Measured ResultsInformationalInformational
38BG Kernel Benchmark Methodology and BaselineActiveProcess
39VM2 Performance Closeout and Successor PlanActiveStandards Track
40vm3 + compiler3 - 8-byte handle Cell, typed arenas, static-type-driven dispatchActiveStandards Track
41Memory Safety - Capability Handles and CISA-roadmap AlignmentDraftStandards Track
42Native Code Emission - Copy-and-Patch JIT, C-as-target AOT, Wasm-first Cross-platformDraftStandards Track
43Zero-Boilerplate Go Transpiler and Go FFI via go/types IntrospectionDraftStandards Track
44Type Bridge - structural Go-to-Mochi type mapping (MEP-43 Phase 1)DraftStandards Track
45Mochi-to-C transpiler (MEP-42 C-AOT deep dive)DraftStandards Track

Workflow

A MEP starts as a draft on a branch. The author opens a pull request titled mep: <short title>. The PR includes the MEP file under website/docs/mep/ and any related code changes. Once the team reaches a decision the status field is updated and the PR is merged.

Steps:

  1. Pick the next available MEP number. Update the index above and the new file's header.
  2. Write the MEP. The default sections are listed in the next section.
  3. Open a PR with the draft. Solicit review.
  4. Update the status to Accepted, Rejected, or Withdrawn based on the outcome.
  5. After implementation lands, update the status to Final and link any follow-up MEPs.

Required sections

Every MEP after the index uses these sections, in this order. Sections that do not apply may be left out, but the headings should not be renamed.

  1. Header table with the metadata fields.
  2. Abstract. A short paragraph that summarises the proposal.
  3. Motivation. Why we need this. Reference concrete code paths or fixtures.
  4. Specification. What the language does or will do. The technical core.
  5. Rationale. Why this design over the alternatives.
  6. Backwards Compatibility. What existing programs break and how we handle migration.
  7. Reference Implementation. Links to source files and lines.
  8. Open Questions. Things we have not decided yet.
  9. References. External material we built on.
  10. Copyright. Public domain dedication.

Why we do this

Mochi is small and fast moving. The parser, type checker, interpreter, and bytecode VM all evolve in lockstep. Without a written record, a syntactic change in parser/parser.go can outrun the matching type rule in types/check.go, or a runtime detail can drift away from what the checker promised. The MEP series is the contract that catches drift before it ships.

The 1800-series internal notes that lived under ~/notes/Spec/1800/ were the seed for this index. They are now MEPs and will be maintained here.

Status snapshot at v0.10.82

  • Parser fixtures: 52 valid pairs and 10 error pairs.
  • Type fixtures: more than 30 valid pairs and more than 45 error pairs.
  • The RUN_TYPE_VALID=1 gate on the valid type-check suite was removed in the v0.11.0 soundness PR.
  • 86 distinct error codes registered in types/errors.go covering roughly T000 through T046 with gaps.
  • Known parser quirks: int | nil is not parseable as a type, and unary minus on the right hand side of == requires parens.

Working agreement

When a language change touches a typing rule, the author updates:

  1. The relevant MEP in this directory.
  2. At least one valid fixture under tests/types/valid/ proving the accepted shape.
  3. At least one error fixture under tests/types/errors/ proving the rejected shape.
  4. A short note in MEP 10 if the change closes or opens a soundness hole.

The next contributor should be able to read these MEPs, plus parser/README.md, plus the fixtures, and onboard onto the soundness work without reading every line of the type checker.

This document is placed in the public domain.