Philosophy & Goals¶
The Endo Language Reference documents the complete specification of the Endo programming language — a modern shell that combines F#-inspired functional programming with bash-compatible shell scripting.
Core Principles¶
- F#-inspired functional shell - Bring functional programming ergonomics to shell scripting
- Bash convenience - Familiar syntax for common operations, easy transition for existing shell users
- Type inference by default - Types are automatically deduced; annotations are optional for documentation or disambiguation
- Unified command model - Functions and external commands share invocation syntax
- Expression-oriented - Most constructs return values and can be composed
Non-Goals¶
- Full POSIX compliance (we prioritize compatibility over strict compliance)
- Complete F# feature parity (practical shell focus takes precedence)
- Replacing bash entirely (interoperability is key)
Design Rationale¶
Endo recognizes that shell scripting and functional programming serve complementary needs:
| Shell Strengths | Functional Strengths |
|---|---|
| Process orchestration | Data transformation |
| System interaction | Complex logic |
| Quick one-liners | Type safety |
| Tool composition | Refactoring confidence |
Endo combines both, letting you choose the right style for each task.
Language Reference Pages¶
- Lexical Elements
- Type System
- Variables & Bindings
- Functions
- Lists & Collections
- Pattern Matching
- Operators & Pipelines
- Control Flow
- Command Execution
- Error Handling
- Lazy Evaluation
- Modules & Imports
- Interoperability: F# Style vs Bash Style
- Standard Library Reference
- Implementation Notes
- EBNF Grammar
See also: Lexical Elements | Type System | Interoperability