Skip to content

Introduction

Welcome to The Pop Book, an introduction to Pop Lang 0.1.0-rc.2. Pop is a statically typed, compiled language with a small, readable syntax. It uses familiar ideas such as functions, records, classes, and interfaces, while keeping blocks easy to recognize with the end keyword.

Here is a complete Pop program:

namespace Welcome
function main()
local language = "Pop"
print("Hello from")
print(language)
end

You do not need to understand every line yet. By the end of the first part, you will know how to write programs like this, store values, make decisions, repeat work, and organize behavior into functions.

Later parts introduce Pop’s types and ways of modeling data. You will build records, tagged unions, classes, and interfaces; learn how namespaces divide a program; and see how closures can carry state. The final parts are a precise guide to the language implemented in this release, including compile-time features, native execution, and the command-line tools.

The opening chapters assume only that you can create a text file and enter a command in a terminal. Programming terms are introduced when they become useful. If you already know another language, the examples should make Pop’s syntax and rules clear without requiring you to read compiler documentation.

This book covers the features available in Pop 0.1.0-rc.2. Pop is still a release candidate, so its standard library and package tooling are small. The book points out those boundaries directly instead of teaching APIs that do not exist yet.

Let us begin by installing Pop and writing a program.