Xarxo — Next-Generation Systems Programming Language

Follow one path, but make it comfortable

A minimalistic yet powerful language with innovative error handling and contracts, designed for developers who value performance and expressiveness in systems programming.

Language Philosophy

Xarxo is built with a clear vision of what a modern systems programming language should be.

Design Principles

We believe systems programming should be both powerful and accessible. Xarxo combines:

  • Minimalism — clean syntax without unnecessary elements
  • Expressiveness — code that's easy to read and maintain
  • Safety — static typing and language-level error control
  • Performance — native code compilation with minimal overhead
  • Innovation — novel approaches to error handling and resource management

Our approach: "One paradigm - multiple possibilities". We don't force OOP where it's not needed, but provide tools for functional and procedural programming.

Engineering Philosophy

Xarxo is designed for engineers who value correctness and reliability above all else:

  • Compile-time verification for critical system invariants
  • Predictable performance with zero-cost abstractions
  • Memory safety without garbage collection
  • Explicit control over hardware resources

We embrace the UNIX philosophy of doing one thing well, extended with modern engineering practices.

Key Features

Xarxo offers unique solutions for modern systems programming challenges.

Error Flows

Innovative error handling with declarative execution paths. Visualize error flows for better understanding.

Learn more

Function Contracts

Define preconditions, postconditions and invariants at function signature level. Automatic runtime checking.

Learn more

Atomic Functions

Guaranteed state rollback on error. Choose between partial or complete rollback.

Learn more

Advanced Type System

Powerful static typing with algebraic data types, generics, and type inference.

Learn more

Deep Dive into Technology

Explore the innovations that make Xarxo unique for systems programming.

Error Flows

Error Flows revolutionize error handling by replacing traditional try/catch blocks with declarative execution path descriptions.

Instead of catching exceptions arbitrarily, developers describe all possible execution paths, including error handling, in a dedicated flows block.

This enables:

  • Clear visibility into all possible execution paths
  • Guaranteed handling of all error types
  • Automatic resource cleanup on any execution outcome
  • Visualization of execution flows for better code understanding
Example: File operations
public func process_file(path: str) -> Result<Data>
    // Declarative execution paths
    flows {
        open_file -> read_content -> process_data
        open_file => FileNotFound: handle_missing_file
        read_content => IOError: handle_io_error
        process_data => ValidationError: log_error
    }
{
    // Main execution path
    file = open_file(path)!
    content = read_content(file)
    result = process_data(content)
    back result
    
    // Error handlers
    flow handle_missing_file(error: FileNotFound) {
        log("File not found: {path}")
        back default_data()
    }
    
    flow handle_io_error(error: IOError) {
        log("IO error: {error.message}")
        escalate(error) // Propagate error
    }
}

Benefits of Error Flows

Code Clarity

All execution paths, including error handling, are described in one place, improving readability.

Guaranteed Handling

Compiler ensures all possible errors have handlers, eliminating unexpected failures.

Resource Management

Resources are automatically released on any execution outcome, including errors.

Function Contracts

Function contracts are a powerful mechanism for defining and verifying function execution conditions directly in their signature.

They explicitly specify:

  • Preconditions (requires) — conditions that must be true before function call
  • Postconditions (ensures) — conditions that will be true after successful execution
  • Invariants (invariant) — conditions maintained throughout function execution
  • Atomicity — state integrity guarantees during function execution

Contracts are checked both at compile time (static conditions) and runtime (dynamic conditions).

Example: Bank transfer
// Contracts defined before function
#contract(
    atomic=true,
    requires=[amount > 0, from.balance >= amount],
    ensures=[from.balance == old(from.balance) - amount,
             to.balance == old(to.balance) + amount]
)
public func transfer_funds(
    from: Account,
    to: Account,
    amount: float
) -> Result<Transaction> {
    // Core logic
    banking.withdraw(from, amount)!
    banking.deposit(to, amount)!
    
    back Transaction(from, to, amount)
}

Benefits of Contracts

Self-documenting Code

Execution conditions are explicitly stated in function signature.

Increased Reliability

Automatic condition checking eliminates entire classes of errors.

Simplified Debugging

Violated contracts immediately identify the failed condition.

Atomic Functions & State Management

Atomicity in Xarxo guarantees that a function either completes fully or has no effect on system state. This is critical for operations affecting multiple entities.

Key aspects:

  • Full atomicity — rollback all changes on any error
  • Partial atomicity — define which changes should be rolled back
  • Transactional blocks — group multiple operations into one atomic operation
  • Temporal variables — automatic change history preservation

Atomic functions are ideal for financial operations, database work, and any scenario requiring data integrity guarantees.

Example: Atomic update
// Marked as atomic function
#contract(atomic=true)
public func update_user_profile(user: User, profile: Profile) {
    // Preserve change history
    temporal user_history = user.history
    
    // Update data
    user.name = profile.name
    user.email = profile.email
    user.phone = profile.phone
    
    // Validation
    validate_user(user)!
    
    // Commit new state on success
    user.history.commit()
}

Benefits of Atomicity

Data Integrity

Guarantees system remains in consistent state even with errors.

Simplified Complex Operations

Enables complex multi-step operations without intermediate states.

Change History

Temporal variables preserve change history for debugging and auditing.

Advanced Type System

Xarxo's type system combines safety with flexibility for systems programming.

Type System Features

Strong Static Typing

Compile-time type checking eliminates entire classes of runtime errors. Explicit type declarations ensure code clarity.

Algebraic Data Types

Sum types and product types enable expressive data modeling. Pattern matching for exhaustive case handling.

Generics & Constraints

Type-safe generic programming with trait constraints. Zero-cost abstractions with monomorphization.

Type Inference

Reduces boilerplate while maintaining safety. Local type inference with explicit signatures at API boundaries.

Resource Types

Special types for hardware resources with ownership semantics. Automatic cleanup guarantees.

Dependent Types

Limited dependent types for compile-time validation of array bounds, matrix dimensions, and other invariants.

Example: Algebraic Data Types
// Define a sum type
type NetworkEvent =
    | Connect(ip: IPAddress)
    | Disconnect(reason: str)
    | Data(payload: [u8])
    
// Pattern matching
public func handle_event(event: NetworkEvent) {
    match event {
        Connect(ip) => log("Connected to {ip}")
        Disconnect(reason) => log("Disconnected: {reason}")
        Data(payload) => process_data(payload)
    }
}

// Generic function with constraints
public func sort<T: Ord>(items: [T]) -> [T] {
    // Implementation
}

Language Guidelines

Xarxo balances familiarity with innovation for a productive developer experience.

Design Principles

  • Familiar Yet Innovative

    Syntax that feels familiar to C-family developers, while introducing carefully designed innovations where they provide significant benefits.

  • Explicit Over Implicit

    Prefer explicit declarations at module boundaries while allowing inference within implementation code for better readability and safety.

  • Resource Awareness

    First-class support for resource management with clear ownership semantics and lifetime tracking.

  • Compile-Time Safety

    Maximize compile-time checks to minimize runtime errors, especially for systems programming concerns.

  • Minimal Runtime

    No mandatory runtime or garbage collector, enabling use in constrained environments from embedded to kernel development.

  • Gradual Complexity

    Simple core language with advanced features available but not required for basic usage.

Example: Resource Management
// File resource with ownership
public func read_config() -> Result<Config> {
    // 'file' owns the resource
    file = open("config.toml")?
    
    // Automatically closed at end of scope
    content = file.read_all()
    
    parse_config(content)
}

// Explicit ownership transfer
public func process_data(data: owned Data) {
    // Takes ownership of data
}

Development Roadmap

Our strategy for language and ecosystem development over the next 18 months.

Community Engagement

We plan to actively involve the community in language development through:

Hackathons

  • Quarterly online hackathons with prizes
  • Themed competitions ("Best Error Flows implementation")
  • Special categories for students and beginners
  • Collaborative ecosystem tool development
  • Real-world problem solving challenges

Educational Initiatives

  • Free online courses on language and compilers
  • University partnerships for curriculum inclusion
  • Online workshops and live coding sessions
  • Mentorship program for new contributors
  • Documentation translation program

Grants Program

  • Funding for key library development
  • Research grants using Xarxo
  • Student scholarships for ecosystem contributions
  • Prizes for best ideas and implementations
  • Open source sustainability funding

Tooling Ecosystem

Development plan for ecosystem tools:

Xarpm (Package Manager)

  • Semantic versioning and dependency management
  • Dependency security integration
  • Automatic documentation generation
  • Isolated execution environments
  • Binary artifact caching

Xardbg (Debugger)

  • Real-time Error Flows visualization
  • Interactive memory state exploration
  • Time-travel debugging capabilities
  • IDE and CI/CD integration
  • Hardware-level debugging support

Xarbench (Benchmarking)

  • Performance comparison across code versions
  • Resource utilization analysis
  • Bottleneck detection in atomic operations
  • Optimization report generation
  • Continuous performance monitoring

Community Events

Planned activities for community building:

Quarterly Hackathons

Focused events with themes like "Systems Tooling", "Embedded Development", and "Concurrency Models".

Core Team AMAs

Monthly live Q&A sessions with language designers and core contributors.

Study Groups

Community-led learning groups exploring advanced language features and systems concepts.

Join Our Community

Become part of developing a language that changes systems programming.