Little Lab

Experiments & essays

2026

Exploding flask

Wonderful

Wonderful is a Swift-like language for the browser and other JavaScript contexts. It implements a subset of Swift’s core features, and extends it in a few ways. It can be compiled into JavaScript during development or at runtime: in the browser, on the server, or from the command line.

The initial implementation was written in JavaScript (the transpiler’s target language), and the second was written in Swift/Wonderful (the transpiler’s source language). The Swift implementation is close to being able to compile itself, which will make Wonderful fully self-hosted.

An interesting thing about a transpiler where there’s already a compiler for the source language is that if you write the transpiler in the source language rather than the target language, you can have both implementations, since the transpiler for the source language can transpile itself into the target language.

The rest of this experiment is for members of the Little Lab.

Join to keep reading →

Already a member? Sign in


← All experiments & essays