SE LANGUAGE GUIDE

Learn the SE language

From your first say statement to types, error handling, async, native interoperability and SE Web. Each lesson follows the current SE documentation.

Core language lessons follow the SE 0.7.0 release documentation. SE Web and the Browser API are labeled separately as 0.8 documentation so versioned Web work is not confused with the 0.7 runtime.
01

Hello SE

SE source files use .se. The smallest useful program can be a single say statement.

02

Values & variables

Assign values with = and let SE infer common types.

03

Input & output

Use say for output and ask for simple interactive text input.

04

Literals

SE has concise literals for numbers, booleans, text, collections, sets and durations.

05

Operators

Arithmetic, comparison, logic, membership and ranges stay compact.

06

Conditions

Use if, else if and else with indentation.

07

Loops & ranges

Repeat fixed work, iterate collections, walk Map pairs, or loop while a condition is true.

08

Functions & closures

Create functions with make and return values with give. Calls normally omit parentheses.

09

Types & generic functions

Type annotations are optional where inference is sufficient, and generic functions can declare type parameters.

10

List, Map & Set

SE includes first-class collection values with indexing, membership and member operations.

11

Text & Bytes

Text and binary-safe Bytes are separate value families.

12

User-defined types & methods

Define compact object-like types with fields and methods.

13

Modules

Use one module syntax for source, built-in, package and native modules.

14

Recoverable errors & try

SE marks fallible work explicitly and can recover, propagate, or create errors.

15

Match / case

SE supports concise value-based matching.

16

Option & Result

Represent absence and success/failure as explicit values when that is clearer than control-flow errors.

17

Async & managed workers

Start managed tasks and wait for their results using small runtime APIs.

18

Files, paths & time

Common platform work is available without leaving SE.

19

JSON & networking

SE maps JSON into native SE values and includes HTTP/HTTPS/network helpers.

20

Testing

SE ships a small assertion module and a project test command.

21

SE Web language

Reuse make and indentation to describe components with HTML, CSS and browser behavior.

22

Browser API

SE Web includes browser requests, navigation, forms, cancellation and DOM helpers.

23

Native interoperability

Native libraries are exposed through C ABI descriptions while ordinary SE code keeps normal use syntax.

24

CLI workflows

One CLI covers checking, running, testing, native builds, projects and Web builds.