Why Thagore?
Why Thagore?
Design Philosophy
Thagore was created with a clear mission: build a modern, statically-typed compiled language that combines the readability of Python with the performance of C, while being entirely self-hosted.
Core Principles
-
Readability First — Python-like indentation syntax makes code easy to read and write. No curly braces, no semicolons — just clean, expressive code.
-
Self-Hosted from Day One — The Thagore compiler is written in Thagore itself. This is both a technical achievement and a design constraint that keeps the language practical and dogfooded.
-
Native Performance — Every Thagore program compiles to native machine code through LLVM IR. No interpreter, no VM, no garbage collector overhead at runtime.
-
Zero C++ Fallback — The bootstrap chain is Stage1 → Stage2 → Stage2b with no C++ compiler stage. The runtime ABI is delivered as pre-built artifacts, not built from C++ source.
-
Practical Interoperability — Direct C FFI via
extern funcand a Python bridge let you leverage existing ecosystems without compromise.
What Makes Thagore Different?
vs. Python
- Thagore is compiled to native code — programs run 10-100x faster
- Thagore is statically typed — type errors are caught at compile time
- Thagore keeps Python’s indentation-based syntax for readability
- No runtime interpreter or GIL
vs. C/C++
- Simpler syntax — no header files, no preprocessor, no complex build systems
- Type inference —
let x = 42just works - Module system —
import fsinstead of#include - Safer defaults — managed strings, no manual null termination
vs. Rust
- Gentler learning curve — no borrow checker, no lifetime annotations
- Faster iteration — simpler type system, faster compile times
- Practical focus — designed for real-world systems programming, not academic correctness
vs. Go
- Richer type system — structs with methods, operator overloading, traits/impl
- No garbage collector — deterministic memory behavior
- LLVM backend — full optimization pipeline from LLVM 21
Trade-offs
| Trade-off | Detail |
|---|---|
| No generics yet | Generic signatures are parsed but lowered via mangling — full parametric polymorphism is in progress |
| Limited error types | Error handling uses return codes (i32); Result<T, E> sugar is parsed but not fully lowered |
| String-heavy IR | Internal representations (token streams, AST nodes) use string-encoded data structures |
| Bootstrap dependency | You need a Stage1 seed binary to build the compiler from source |
Target Audience
Thagore is ideal for developers who:
- Want native performance without C/C++ complexity
- Prefer Python-like syntax but need compiled-language speed
- Need C FFI to integrate with existing native libraries
- Want to understand how a self-hosted compiler works from the inside
- Are building systems tools, CLI applications, or performance-critical software