Cm Language Tutorials v0.14.1
Target Version: v0.14.1
Last Updated: 2026-02-20
A comprehensive collection of tutorials to learn all features of the Cm language step-by-step.
📚 Learning Paths
Path 1: Learning the Basics (For Beginners)
Estimated Time: 3-4 hours
- Basics - Language foundations (10 tutorials)
- Introduction - Features and design philosophy
- Setup - Compiler build and setup
- Hello, World! - Your first program
- Variables and Types - Primitive types, const/static
- Operators - Arithmetic, comparison, logical operations
- Control Flow - if/while/for/switch/defer
- Functions - Definition, overloading, default arguments
- Arrays - Declaration, methods, for-in
- Pointers - Addresses, dereference, Array Decay
- Modules - Module system and imports
Path 2: Learning the Type System (For Intermediate Users)
Estimated Time: 4-5 hours
- Type System - Advanced type features
- Structs - Definition, constructors, nesting
- Enums - Enumerations, Tagged Unions, match decomposition
- typedef - Type aliases and literal types
- Generics - Type parameters, inference, monomorphization
- Interfaces - interface/impl/self
- Constraints - AND/OR boundaries, where clause
- Ownership - Move semantics, borrowing
- Lifetimes - Reference validity
Path 3: Learning Advanced Features (For Advanced Users)
Estimated Time: 5-6 hours
- Advanced Features - Powerful language features
- match Expression - Pattern matching, guards, exhaustiveness
- Auto Implementation - with Eq/Ord/Clone/Hash
- Operator Overloading - impl T syntax, compound assignment (+=), bitwise
- Function Pointers - Higher-order functions
- Lambda - Closures
- String Operations - Methods and slicing
- Slices - Dynamic arrays
- FFI - C interop
- Threads - Parallel processing
- const - Compile-time constants
- must keyword - Enforced return value usage
- Macros - Conditional compilation
Path 4: Learning Compilation
Estimated Time: 3 hours
- Compiler - Build and backends
- Usage - Commands and options
- LLVM Backend - Native compilation
- WASM Backend - WebAssembly output
- JS Backend - JavaScript output
- UEFI Baremetal - UEFI application development (no_std)
- Preprocessor - Conditional compilation
- Linter - Static analysis (cm lint)
- Formatter - Code formatting (cm fmt)
- Optimization - O0-O3, tail call optimization
Path 5: Learning Internals (For Developers)
Estimated Time: 3 hours
- Internals - How the compiler works
- Architecture - Overall structure and pipeline
- Algorithms - Analysis and optimization algorithms
- Optimization - MIR/LLVM level optimizations
🎯 Guide by Difficulty
🟢 Beginner - For those with programming experience
- Hello, World!
- Variables and Types
- Operators
- Control Flow
- Functions
🟡 Intermediate - Understand the basics of Cm
- Arrays and Pointers
- Structs and Enums
- Interfaces
- Threads
🔴 Advanced - Requires deep understanding of type systems and memory management
- Generics and Constraints
- match Expression and Pattern Guards
- FFI and inline assembly
🔗 Related Links
- Language Specification - Full language spec
- Design Documents - Architecture and design docs
- Test Cases - 380+ files
Total Tutorials: 43 files
Estimated Time: 18-22 hours
Target Version: v0.14.1
Last Updated: 2026-02-20
Author: Cm Language Development Team