Getting Started

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:

hello.bangbanglacode
1// Variable declaration
2dhoro naam = "Ankan";
3dhoro boyosh = 25;
4
5// Print output
6dekho("Namaskar! Amar naam", naam);
7
8// Conditional
9jodi (boyosh >= 18) {
10 dekho(naam, "is an adult");
11} nahole {
12 dekho(naam, "is a minor");
13}
14
15// Loop
16ghuriye (dhoro i = 1; i <= 5; i = i + 1) {
17 dekho("Count:", i);
18}
19
20// Function
21kaj square(n) {
22 ferao n * n;
23}
24
25dekho("5 squared =", square(5));

Language Features

BanglaCode is a complete programming language with:

FeatureDescription
29 Bengali KeywordsAll control flow, declarations, and async/await in Bengali
95+ Built-in FunctionsString, array, math, file I/O, HTTP, JSON, networking (TCP/UDP/WebSocket), and complete OS-level system access
Object-OrientedClasses, constructors, methods, instances
Module SystemImport/export with namespace support
Error HandlingTry-catch-finally with throw
HTTP ServerBuild web applications

Architecture

The interpreter follows a classic pipeline architecture:

Source Code → Lexer → Tokens → Parser → AST → Evaluator → Result
  1. Lexer - Tokenizes source code, recognizes Bengali keywords
  2. Parser - Builds Abstract Syntax Tree using Pratt parsing
  3. 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: