Introduction to BanglaCode
BanglaCode is a Bengali-syntax programming language that makes coding accessible to Bengali speakers. Write code using familiar Bengali words in English script (Banglish).
Bengali Syntax
Use Bengali keywords like dhoro, jodi, kaj
Full-Featured
OOP, modules, error handling, HTTP servers
Easy to Learn
Intuitive syntax for Bengali speakers
What is BanglaCode?
BanglaCode is a tree-walking interpreter written in Go that allows you to write programs using Bengali keywords. The language uses Banglish (Bengali words written in English/Latin script) to make it easy to type on any keyboard while remaining familiar to Bengali speakers.
Design Philosophy
- Accessibility - Lower the barrier for Bengali speakers to learn programming
- Completeness - Full programming language features, not just a toy
- Familiarity - Keywords match natural Bengali expressions
- Simplicity - Clean, minimal syntax without unnecessary complexity
Quick Example
Here's a simple BanglaCode program that demonstrates the core syntax:
| 1 | // Variable declaration |
| 2 | dhoro naam = "Ankan"; |
| 3 | dhoro boyosh = 25; |
| 4 | |
| 5 | // Print output |
| 6 | dekho("Namaskar! Amar naam", naam); |
| 7 | |
| 8 | // Conditional |
| 9 | jodi (boyosh >= 18) { |
| 10 | dekho(naam, "is an adult"); |
| 11 | } nahole { |
| 12 | dekho(naam, "is a minor"); |
| 13 | } |
| 14 | |
| 15 | // Loop |
| 16 | ghuriye (dhoro i = 1; i <= 5; i = i + 1) { |
| 17 | dekho("Count:", i); |
| 18 | } |
| 19 | |
| 20 | // Function |
| 21 | kaj square(n) { |
| 22 | ferao n * n; |
| 23 | } |
| 24 | |
| 25 | dekho("5 squared =", square(5)); |
Language Features
BanglaCode is a complete programming language with:
| Feature | Description |
|---|---|
| 29 Bengali Keywords | All control flow, declarations, and async/await in Bengali |
| 95+ Built-in Functions | String, array, math, file I/O, HTTP, JSON, networking (TCP/UDP/WebSocket), and complete OS-level system access |
| Object-Oriented | Classes, constructors, methods, instances |
| Module System | Import/export with namespace support |
| Error Handling | Try-catch-finally with throw |
| HTTP Server | Build web applications |
Architecture
The interpreter follows a classic pipeline architecture:
- Lexer - Tokenizes source code, recognizes Bengali keywords
- Parser - Builds Abstract Syntax Tree using Pratt parsing
- Evaluator - Tree-walking interpreter executes the AST
File Extension
BanglaCode source files use the .bang extension. For example:hello.bang, calculator.bang, server.bang.
Next Steps
Ready to start coding in Bengali? Follow these guides: