FS FormScript

The FormScript tutorial

Seventeen short sections, in the order that makes them easiest to learn. Each one explains one idea and shows it in a form you can run.

Every example on these pages is a complete document. Copy one into the playground and press run — the playground loads the reference implementation itself, so what you see is what a conforming runtime produces.

The sections

What you need to know first

Nothing. FormScript is not JavaScript, not SQL and not HTML, and none of those habits are useful here. The language has fourteen types, no implicit conversions and no exceptions, so the only thing you need is a willingness to read what a document says.

If you would rather read the whole language in one page, there is the language section by section. If you want the formal version, there is the specification.

How to read the course

Each section stands on its own, but the order matters: a section uses the vocabulary of the sections before it. The ideas that are hardest in a language like this one — what an unanswered question is, and when a computed value recomputes — get a section each, in the middle of the course, where you have the rest of the vocabulary to read them with.

The last three sections are about the tooling: how to read a diagnostic, how a renderer is given a form, and how to run the language outside this site.