Cone Language Reference

The Guide

The Guide gets you writing real Cone programs, quickly. By its end, you will be writing programs that divide their work and put every core of your machine to it.

It covers the fundamentals, in four stretches, and then shows how a program grows:

  • The basics: a first program, then variables, types and expressions.
  • Control flow: blocks and conditionals, loops, and functions.
  • Data types: numbers and strings, tuples, the structs and enums you build your data from, and the collections (lists and dictionaries) that hold it. Making a struct of yours behave like a built-in type, and values there can only be one of, are in Recipes.
  • Concurrency: actors, which work side by side and are called like methods, and parallel each, one loop on every core.
  • Growing a program: more files, submodules, a library of your own, and tests, all built with Congo.

You have probably met most of these ideas before, in some form, so the pages move quickly. Where Cone does something its own way, a page slows down to show you. Every complete program can be run, and changed, in the playground, with nothing to install.

After the Guide come the parts where Cone is most itself: memory that is both safe and yours to manage, concurrency in depth, modularity, and safety and the boundary with C. They ask more thought of you, and they repay it. Recipes then gathers solutions to problems you will run into while building something real, each drawing on whatever parts it needs. The Guide is the foundation they build on, so let's begin.