Foreword
Welcome to The Toka Programming Language Guide.
This book is a comprehensive guide to learning Toka — a modern systems programming language designed for safety, simplicity, and performance.
Toka is created by YiZhonghua. The official language repository is at github.com/tokalang/toka — visit it to explore the compiler, standard library, and more.
Who This Book Is For
- Beginners who want to learn their first systems programming language
- Experienced developers coming from C, Rust, Go, or other languages
- Language enthusiasts curious about the Hat Principle and PAL Checker
What You'll Learn
- Getting started — Install Toka and write your first program
- Language basics — Variables, types, functions, control flow
- The Hat Principle — Toka's unique approach to memory safety
- Advanced features — Generics, error handling, concurrency
- Standard library tours — Strings, collections, IO, networking, and more
- Hands-on projects — Build CLI tools, HTTP servers, and regex engines
How to Use This Book
If you're new to Toka, start from the beginning and work your way through. Each chapter builds on the previous one.
If you're an experienced developer, feel free to jump to specific topics using the sidebar navigation.
Language Version Alignment
This book is kept up-to-date with the latest Toka compiler development. The current version of this documentation is aligned with:
- Compiler Version:
v0.9.8 - Toka Commit:
aadfd52(Unify three-track string system, abolish while in favor of loop, refactor std with generational Slab allocator, and introduce forge parallel build engine) - Tag:
v0.9.8-03
A Note From the Author
Toka is a young but ambitious language. This guide was written alongside the language's development to help early adopters get started. As Toka evolves, this book will evolve with it.
[!NOTE] Since Toka is still under active development and rapid iteration, some descriptions or features in this book may occasionally have slight discrepancies with the actual behavior of the latest compiler. For absolute accuracy, please always refer to the official compiler and standard library source code as the ultimate source of truth.
Happy coding!
— lumicore-dev