Silex
What’s new Docs Install Packages Registry GitHub Français

Navigation

What’s new Docs Install Packages Registry GitHub Français
DocumentationHome

Learn

  • Write and run a first program

Language

  • Write a comment
  • Print a result or stop the program

Values

  • Store and change values
  • Choose a built-in type
  • Write a literal value
  • Omit an initial value
  • Convert a number
  • Build text
  • Calculate, compare, and chain operations

Control flow

  • Choose a branch and repeat an action
  • Explicitly limit a scope
  • Protect shared state

Functions

  • Define and call a function
  • Pass a callback function
  • Adapt a call with default values and overloads
  • Adapt a function to several types
  • Return a recoverable error

Data types

  • Create a nominal value with a structure
  • Share an identity with a class
  • Understand an intrinsic class
  • Specialize a class through inheritance
  • Control access with a property
  • Define static members and containers
  • Adapt a type to several concrete types
  • Run deterministic cleanup
  • Define a contract with a protocol
  • Add methods with an extension
  • Represent an absent value
  • Select a value with `match`
  • Group values with a tuple
  • Give another name to a type
  • Inspect a value's metadata

Collections

  • Choose an array or a list
  • Traverse values
  • Borrow a collection view

Ownership

  • Copy or transfer a value
  • Borrow a value

Modules

  • Import and qualify a declaration
  • Map files to modules
  • Compose portable and targeted fragments
  • Re-export and contribute to a facade
  • Expose or hide a declaration
  • Understand package boundaries
  • Embed a file in the executable

Interoperability

  • Bind and call a C function
  • Exchange text and scalars with C
  • Provide a callback or call a C address
  • Know the current interoperability boundary

Tools

  • Install Silex
  • Run, interpret, or compile a program
  • Write and run tests
  • Update and maintain Silex
  • Define a package with `Package.json`
  • Install and select packages
  • Develop with local packages
  • Publish a package in the registry
  • Install the Silex extension for Zed
  • Install the Silex extension for VS Code
  • Read the CLI reference

Reference

  • Find a syntax form
  • Know the limits of Silex 0.44
DocumentationHome

Learn

  • Write and run a first program

Language

  • Write a comment
  • Print a result or stop the program

Values

  • Store and change values
  • Choose a built-in type
  • Write a literal value
  • Omit an initial value
  • Convert a number
  • Build text
  • Calculate, compare, and chain operations

Control flow

  • Choose a branch and repeat an action
  • Explicitly limit a scope
  • Protect shared state

Functions

  • Define and call a function
  • Pass a callback function
  • Adapt a call with default values and overloads
  • Adapt a function to several types
  • Return a recoverable error

Data types

  • Create a nominal value with a structure
  • Share an identity with a class
  • Understand an intrinsic class
  • Specialize a class through inheritance
  • Control access with a property
  • Define static members and containers
  • Adapt a type to several concrete types
  • Run deterministic cleanup
  • Define a contract with a protocol
  • Add methods with an extension
  • Represent an absent value
  • Select a value with `match`
  • Group values with a tuple
  • Give another name to a type
  • Inspect a value's metadata

Collections

  • Choose an array or a list
  • Traverse values
  • Borrow a collection view

Ownership

  • Copy or transfer a value
  • Borrow a value

Modules

  • Import and qualify a declaration
  • Map files to modules
  • Compose portable and targeted fragments
  • Re-export and contribute to a facade
  • Expose or hide a declaration
  • Understand package boundaries
  • Embed a file in the executable

Interoperability

  • Bind and call a C function
  • Exchange text and scalars with C
  • Provide a callback or call a C address
  • Know the current interoperability boundary

Tools

  • Install Silex
  • Run, interpret, or compile a program
  • Write and run tests
  • Update and maintain Silex
  • Define a package with `Package.json`
  • Install and select packages
  • Develop with local packages
  • Publish a package in the registry
  • Install the Silex extension for Zed
  • Install the Silex extension for VS Code
  • Read the CLI reference

Reference

  • Find a syntax form
  • Know the limits of Silex 0.44
Silex v0.47.1 / Docs Canonical source ↗

Model data

Choose the form that matches the identity, lifetime, and variations of your data.

  • Create a nominal value with a structure
  • Share an identity with a class
  • Understand an intrinsic class
  • Specialize a class through inheritance
  • Control access with a property
  • Define static members and containers
  • Adapt a type to several concrete types
  • Run deterministic cleanup
  • Define a contract with a protocol
  • Add methods with an extension
  • Represent an absent value
  • Represent a choice with an enum and match
  • Group values with a tuple
  • Give another name to a type
  • Inspect a value's metadata

Back to language concepts

Silex language developed by Matanek. Apache-2.0 with LLVM exception