Why DynLex
A language built from first principles, not decades of legacy decisions.
Philosophy
No Hardcoded Patterns
Unlike traditional languages, DynLex has no built-in keywords. There is no hardcoded if, for, or while.
Everything you write is a pattern that you or someone else defined. The compiler focuses entirely on understanding context and deducing meaning from how patterns are used.
Context-Driven Compilation
The DynLex compiler doesn't rely on rigid syntax rules. Instead, it analyzes how patterns relate to each other and deduces types, control flow, and intent from context. This means the same pattern can adapt to different situations without explicit type annotations or boilerplate.
Patterns Define Everything
Want Python-style syntax? Define it. Prefer something closer to natural English? Define it. The language is whatever you make it. This isn't a gimmick - it's the core architecture.
# You could define Python-like syntax
effect for item in collection:
# implementation
# Or natural language
effect for each item in collection:
# same implementation, different syntax
Your Language, Literally
Write code in any spoken language. Define patterns in Dutch, Spanish, or invent your own.
effect print message:
execute:
@intrinsic("print", message)
print "Hello, world"
effect zeg bericht:
execute:
@intrinsic("print", bericht)
zeg "Hallo, wereld"
# Define any syntax you want
effect yell words loudly:
execute:
@intrinsic("print", words)
yell "DynLex is amazing" loudly
LSP Support
Full Editor Integration
DynLex ships with a Language Server Protocol implementation. Get real-time diagnostics, syntax highlighting, go-to-definition, and hover documentation in VS Code, Neovim, or any LSP-compatible editor.
Pattern-Aware Intelligence
The LSP understands your custom patterns. Auto-complete suggestions adapt to the patterns you've defined, and diagnostics catch pattern mismatches before you run the code.
How It Works
Pattern Matching
When you write code, the compiler matches your text against all defined patterns. Variables are identified by position, types are inferred from usage, and the most specific matching pattern wins.
Compile-Time Resolution
All pattern matching happens at compile time. By the time your code runs, it's pure machine code - no pattern matching overhead, no interpretation, just raw performance.
LLVM Backend
DynLex compiles to LLVM IR, giving you access to decades of optimization research. The same backend that powers Rust, Swift, and Clang now powers your natural language code.