SP
SP Docsdocs.splang.shantopaul.com
v1.0.0
Main SiteRegistryGitHub

Getting Started

  • Introduction & Overview
  • Installation
  • First Program (Hello SP)
  • Project Scaffolding (spm)

Language Tour & Syntax

  • Syntax Overview
  • Complete Syntax Guide (1–100)100 Examples
  • Variables & Constants
  • Primitive & Complex Types
  • Control Flow & Matching
  • Functions & Closures
  • OOP, Classes & Structs
  • Zero-Cost Generics
  • Lambdas & Higher-Order
  • Null Safety & Operators

Standard Library (stdlib)

  • Stdlib Overview
  • std.io (Console I/O)
  • std.string (String Utils)
  • std.math (Math & Trig)
  • std.collections (List, Map, Set)
  • std.fs (File System)
  • std.time (Clock & Duration)
  • std.os (Environment & System)
  • std.process (Execution & IPC)

Developer Tooling

  • Toolchain Overview
  • Compiler CLI (spc)
  • Package Manager (spm)
  • Code Formatter (spc fmt)
  • Native Test Runner (spc test)
  • Doc Generator (spc doc)
  • Language Server (spls)
  • DAP Debugger (spd)
  • VS Code Extension

Performance & Architecture

  • 7-Language Benchmarks
DocsLanguage Tour

SP Language Syntax Tour

SP combines the best parts of C-family ergonomics with modern type safety. Explore the core syntax chapters below:

tour_preview.sp
1import std.io;
2
3// Variables with inference
4let name = "SP";
5var counter = 0;
6
7// Type annotations & functions
8fn add(int a, int b) -> int {
9 return a + b;
10}
11
12// Pattern matching
13enum Role { Admin, User }
14
15fn check(Role r) -> string {
16 return match (r) {
17 Role.Admin => "Superuser",
18 Role.User => "Standard"
19 };
20}
⭐ New: All 100 Code Examples

Complete SP Syntax Guide (1–100 Examples)

Browse, search, and copy all 100 serial code examples from basic syntax to multi-threaded REST microservices.

Variables & Constants

let and var declarations, mutability, and type inference.

Primitive & Complex Types

int, double, string, bool, and collection structures.

Control Flow & Matching

if/else, for loops, while loops, and pattern matching.

Functions & Closures

Named functions, return types, and default parameters.

OOP, Classes & Structs

Constructors, inheritance, interfaces, and value structs.

Zero-Cost Generics

Generic types with compile-time monomorphization.

Lambdas & Functional Pipelines

Arrow lambdas, closures, map/filter/reduce.

Null Safety & Operators

Nullable types (T?), safe navigation (?.), and coalescing (??).

PreviousProject ScaffoldingNextVariables & Constants

© 2026 SP Programming Language. Developed by Shanto Paul.

Edit this page on GitHub•Official Website