The Zeno Book Zeno 0.1 zeno-lang.org

G What Version 0.1 Leaves Out

Before version 0.1, every decision in docs/decisions.md was read again, and thirty were answered "a limit of 0.1": the thing is left out of this version, and a program that asks for it is told so. Each can be added later without changing what any program written now means. The numbers are the decisions, for anyone who wants the argument.

G.1 On a board

Inputs.

Reading a pin, an analogue converter or a serial port, and interrupts and timers. This was the one item taken off the list for 0.1, because it has to be designed against real hardware. The simulated board can write pins and registers and read registers.

G.2 Numbers

No u64.

Sized numbers stop at 32 bits, and int is the 64-bit signed number (2.8d).

A list[u8] takes eight bytes an item.

The type is checked as bytes, but stored as whole numbers (5.13a).

Units made of units.

Two quantities cannot be multiplied or divided into a third, as V times A into W, and a program cannot name a unit of its own (1.15).

No bytes from a file.

Files are read and written as text (6.16).

G.3 Types

Unions.

Only or none can follow a type: int or str is refused (1.13). An enum that carries data does the same work.

Generic interfaces and bounds.

An interface cannot take a type parameter, so a generic function cannot ask that its T has a method (3.16d).

Generic enums.

An enum cannot take a type parameter, and a generic function cannot be kept as a value (3.16e).

G.4 The library

sort by a function.

sort uses the natural order of numbers and text (6.6).

Files in pieces.

A file is read whole, or as a list of lines (6.12, 6.20).

program.exit and the environment.

A program ends at its last line or with an uncaught error, and cannot read environment variables (6.19).

A few functions of mathematics.

No hypot, no hyperbolic functions, no gcd or clamp, and no random numbers (6.21).

A library written in Zeno.

The library is built into the compiler, not written in Zeno itself.

G.5 Builds

A named function inside a function

runs under zeno run, but is refused by a build. Write it at the top, or as a function value.

One file at a time.

A build compiles the whole program at once (7.11).

Another processor in one step.

A build writes C for the C compiler you name; compiling for a board is a second step on the cc line.

GCC and Clang built-ins.

Checked arithmetic uses them, so the C wants one of those two compilers (5.5e).

setjmp in an ordinary build.

An ordinary build uses it for try, and a firmware build does not use it at all (5.11l, 12.8).

G.6 Firmware and no collector

A raising function as a value.

In a firmware build, a function that says raises cannot be passed around, because a function type does not say whether it raises (5.5l).

Lists of maybe.

list[int or none] is refused with no collector; an enum with a case for the missing value is the answer (5.16h).

Dicts of lists or objects

with no collector (10.14).

Some moves of an owned value

that have no rule yet for what is left behind (5.8i, 5.15e, 5.17d).

raise e with no collector,

raising again an error that was caught (5.9d).

The pool’s size

is set on the C compiler’s line, not in the program (5.9j); spare blocks are not filled with a pattern to catch their use (5.9k).

G.7 Interfaces

Functions of an interface

have no defaults for parameters, no type parameters, and cannot be private (10.5).

An owned class as an interface,

and an interface with type parameters of its own (10.10).

G.8 Tools

Hover on a field.

The language server shows the type of a name, but not yet of a field (9.11).

Choosing tests.

zeno test runs every test in the files it is given, and cannot run one by name or test a compiled program. assert takes no message, and is only for tests (10.21).

G.9 Not limits

Three things are not on this list, because they are decided: Zeno has no inheritance, no second way to write a function, and no second name for a module. The reasons are in Why Zeno Is as It Is.