1Overview & Problem
Problem. Mainstream programming languages use English keywords and documentation. Many Bangla-speaking learners must learn English vocabulary and programming concepts at the same time, which raises the barrier to entry.
Product. Shobdo is a general-purpose, modern language where every user-facing surface is Bangla: keywords, standard library names, error messages, REPL, docs and CLI. A companion framework, Shobdo Web, builds web apps and APIs in the same language.
Positioning. A real language, not a toy: optional static types, modules, closures, pattern matching, async, and a path to a fast bytecode VM, while staying easy for first-time learners.
2Goals, Non-Goals & Metrics
🎯 Goals
- Full Bangla surface: keywords, identifiers, digits (০–৯), errors, docs
- Modern feature set (see §4)
- Beginner-friendly yet capable of real apps
- Transliterated keyword aliases for easy typing
- JS/Python interop for fast adoption
- Open source with a welcoming contribution model
🚫 Non-Goals (v1)
- Replacing English-based languages
- Own native optimizing compiler (post-1.0)
- Systems/OS-level programming
- Mobile UI toolkit (later)
- Free-form natural-language parsing: the grammar is formal and deterministic
📊 Success Metrics (proposed)
- A beginner completes the first tutorial in one sitting
- Spec conformance test coverage ≥ 95%
- REPL cold start target set after first benchmark
- Parser throughput target set after first benchmark
- First external contributors and packages by 1.0
3Users & Use Cases
| Persona | Need | Key features |
|---|---|---|
| School / college student | Learn logic without an English barrier | Bangla errors, REPL, playground, লেখো/পড়ো |
| Teacher | Teach programming in Bangla medium | Curriculum, docs, exercises |
| Hobbyist / freelancer | Build small real apps quickly | Shobdo Web, package manager, interop |
| Professional developer | Strong, safe, fast language | Optional types, modules, async, LSP, tests |
| Contributor | Extend the language | Clear architecture, RFC process, tests |
4Language Specification
4.1 Design principles
Readable
Natural Bangla words, short enough to type.
Flexible
Multi-paradigm, optional types, keyword aliases.
Strong
No silent coercions, null-safety, exhaustive matching, immutability option.
Modern
Closures, modules, async/await, pattern matching, interpolation, destructuring.
4.2 Keywords (proposed; final spellings need review by Bangla linguists and teachers)
| Concept | Bangla | Alias (Latin) | Meaning |
|---|---|---|---|
| Variable | ধরি | dhori | let |
| Constant | ধ্রুব | dhruba | const |
| If / else if / else | যদি / নাহলে যদি / নাহলে | jodi / nahole jodi / nahole | conditionals |
| While | যতক্ষণ | jotokkhon | while |
| For each | প্রতিটি … এর মধ্যে | protiti … er moddhe | for-in |
| Break / continue | থামো / এগোও | thamo / egao | loop control |
| Function / return | কাজ / ফেরত | kaj / ferot | fn / return |
| Class / struct | শ্রেণি / গঠন | shreni / gothon | class / struct |
| Self | এটি | eti | this |
| Match | মেলাও | melao | pattern match |
| True / false / null | সত্য / মিথ্যা / শূন্য | shotto / mittha / shunno | literals |
| And / or / not | এবং / অথবা / না | ebong / othoba / na | logic |
| Import / from / export | আনো / থেকে / দাও | ano / theke / dao | modules |
| Try / catch / throw | চেষ্টা / ধরো / ছোড়ো | chesta / dhoro / chhoro | errors |
| Async / await | অসমকালীন / অপেক্ষা | osomokalin / opekkha | async |
| Print / input | লেখো / পড়ো | lekho / poro | I/O builtins |
| Constructor | তৈরি | toiri | constructor |
| Parent | উর্ধ্ব | urdhwo | super |
| Override | পুনঃলেখ | punolekh | override |
| Private | গোপন | gopon | private member |
| Static | স্থির | sthir | static member |
| Trait / implements | আচরণ / বাস্তবায়ন | achoron / bastobayon | trait / implements |
| Membership operator | ভিতরে | bhitore | in |
4.3 Feature set
| Feature | Priority | Notes |
|---|---|---|
| Variables, constants, Bangla & Latin digits | P0 | ০–৯ and 0–9 both accepted |
| Types: সংখ্যা, দশমিক, লেখা, সত্যমিথ্যা, তালিকা, মানচিত্র, শূন্য | P0 | int, float, string, bool, list, map, null |
| Control flow, functions, closures | P0 | First-class functions, default and named args |
String interpolation "নাম: {নাম}" | P0 | Unicode-safe |
| Modules / imports | P0 | File-based, explicit exports |
| Bangla error messages and stack traces | P0 | Line/column, snippet, suggestion |
| Classes / structs, traits | P1 | Composition-first |
| Pattern matching + destructuring | P1 | Exhaustiveness checks |
| Optional static typing + inference | P1 | Gradual: untyped code still runs |
| Null safety | P1 | No implicit null access |
| Async / await | P2 | Event-loop first |
| Generics | P2 | After type checker is stable |
| Macros | P3 | Evaluate after 1.0 |
4.4 Sample programs (illustrative syntax)
// ভেরিয়েবল ও শর্ত
ধরি বয়স = ২৫
যদি বয়স >= ১৮ {
লেখো("প্রাপ্তবয়স্ক")
} নাহলে {
লেখো("অপ্রাপ্তবয়স্ক")
}
// ফাংশন ও রিকার্শন
কাজ ফ্যাক্টরিয়াল(ন: সংখ্যা): সংখ্যা {
যদি ন <= ১ { ফেরত ১ }
ফেরত ন * ফ্যাক্টরিয়াল(ন - ১)
}
লেখো("৫! = {ফ্যাক্টরিয়াল(৫)}")
// তালিকা, লুপ ও ক্লোজার
ধরি সংখ্যাগুলো = [১, ২, ৩, ৪]
ধরি বর্গ = সংখ্যাগুলো.রূপান্তর(ক => ক * ক)
প্রতিটি ম এর মধ্যে বর্গ { লেখো(ম) }
// শ্রেণি
শ্রেণি ছাত্র {
নাম: লেখা
রোল: সংখ্যা
কাজ পরিচয়() { ফেরত "{এটি.নাম} (রোল {এটি.রোল})" }
}
// প্যাটার্ন ম্যাচ
মেলাও ফলাফল {
সফল(মান) => লেখো("পাওয়া গেছে: {মান}")
ব্যর্থ(কারণ) => লেখো("ভুল: {কারণ}")
}
// অসমকালীন
অসমকালীন কাজ তথ্য_নামাও(ঠিকানা) {
ধরি উত্তর = অপেক্ষা নেটওয়ার্ক.নামাও(ঠিকানা)
ফেরত উত্তর.json()
}4ALanguage Basics: Syntax, Operators, Functions, Classes
A. Basic syntax rules
| Rule | Design | Example |
|---|---|---|
| Statements | One per line; semicolon optional | ধরি ক = ১ |
| Blocks | Curly braces | যদি ক > ০ { … } |
| Comments | // single line, /* */ multi-line, /// doc comment | // মন্তব্য |
| Identifiers | Bangla or Latin letters, digits, _; cannot start with a digit; cannot be a keyword | মোট_দাম, total2 |
| Numbers | Bangla or Latin digits; _ separator; decimal point | ১২৩, 3.14, ১_০০০ |
| Strings | Double quotes; {expr} interpolation; escapes \n \t \" \{ | "নাম: {নাম}" |
| Variables | ধরি is mutable; ধ্রুব is constant (cannot be reassigned) | ধ্রুব পাই = ৩.১৪ |
| Types | Optional annotation after :; inferred if omitted | ধরি বয়স: সংখ্যা = ২৫ |
// মূল ধরন (types)
ধরি ক: সংখ্যা = ১০ // integer
ধরি খ: দশমিক = ৩.৫ // float
ধরি গ: লেখা = "হ্যালো" // string
ধরি ঘ: সত্যমিথ্যা = সত্য // bool
ধরি ঙ = [১, ২, ৩] // list
ধরি চ = {"নাম": "রিমা", "বয়স": ২০} // map
ধরি ছ = শূন্য // null
B. Operators
Arithmetic
| Op | Meaning | Example |
|---|---|---|
+ | add / join strings | ৫ + ২ → ৭ |
- | subtract / negate | ৫ - ২ → ৩ |
* | multiply | ৫ * ২ → ১০ |
/ | divide (decimal result) | ৫ / ২ → ২.৫ |
// | integer division | ৫ // ২ → ২ |
% | remainder | ৫ % ২ → ১ |
** | power (right-assoc.) | ২ ** ৩ → ৮ |
Comparison
| Op | Meaning |
|---|---|
== != | equal / not equal (no implicit coercion) |
< <= | less / less or equal |
> >= | greater / greater or equal |
ভিতরে | membership: ৩ ভিতরে [১,২,৩] |
Logical
| Op | Meaning |
|---|---|
এবং | and (short-circuit) |
অথবা | or (short-circuit) |
না | not |
Conditions accept only সত্যমিথ্যা values; there is no implicit truthiness.
Assignment
| Op | Meaning |
|---|---|
= | assign |
+= -= *= /= %= **= | compound assign |
Assignment is a statement, not an expression, which prevents if (a = b) bugs.
Null-safety & other
| Op | Meaning |
|---|---|
?. | safe member access |
?? | default if null |
.. ..= | range (exclusive / inclusive) |
? : | ternary: শর্ত ? ক : খ |
=> | lambda / match arm |
Precedence (high → low)
().?.[]call**- unary
-,না *///%+-....=<<=>>=ভিতরে==!=এবংঅথবা??? :
ধরি ফল = (২ + ৩) * ৪ ** ২ // ৮০
ধরি ভাগশেষ = ১৭ // ৫ + ১৭ % ৫ // ৩ + ২ = ৫
ধরি যোগ্য = বয়স >= ১৮ এবং না নিষিদ্ধ
ধরি নাম = ব্যবহারকারী?.নাম ?? "অতিথি"
ধরি মান = বয়স >= ১৮ ? "প্রাপ্তবয়স্ক" : "অপ্রাপ্তবয়স্ক"
গণনা += ১
C. Control flow
// শর্ত
যদি নম্বর >= ৮০ { লেখো("A+") }
নাহলে যদি নম্বর >= ৬০ { লেখো("A") }
নাহলে { লেখো("B") }
// while
ধরি i = ১
যতক্ষণ i <= ৫ { লেখো(i); i += ১ }
// for-each ও range
প্রতিটি i এর মধ্যে ১..=৫ {
যদি i % ২ == ০ { এগোও } // continue
যদি i > ৪ { থামো } // break
লেখো(i)
}
D. Functions
| Feature | Explanation |
|---|---|
| Declaration | কাজ নাম(প্যারামিটার: ধরন): ফেরতধরন { … }; types are optional |
| Return | ফেরত মান; a function without it returns শূন্য |
| Default params | কাজ f(ক, খ = ১) |
| Named args | f(খ: ৫, ক: ২) |
| Variadic | কাজ f(...সব) collects extra arguments into a list |
| Lambda | (ক, খ) => ক + খ |
| First-class | Functions are values: store, pass and return them |
| Closures | Inner functions capture variables from the enclosing scope |
| Recursion | Supported; tail-call optimization is a post-1.0 consideration |
| Multiple results | Return a list and destructure: ধরি [ক, খ] = f() |
কাজ যোগ(ক: সংখ্যা, খ: সংখ্যা = ০): সংখ্যা {
ফেরত ক + খ
}
লেখো(যোগ(২, ৩)) // ৫
লেখো(যোগ(খ: ৫, ক: ১)) // ৬ (named arguments)
কাজ সমষ্টি(...সংখ্যাগুলো) {
ধরি মোট = ০
প্রতিটি ন এর মধ্যে সংখ্যাগুলো { মোট += ন }
ফেরত মোট
}
// ক্লোজার: কাউন্টার
কাজ কাউন্টার() {
ধরি গণনা = ০
ফেরত () => { গণনা += ১; ফেরত গণনা }
}
ধরি পরের = কাউন্টার()
লেখো(পরের(), পরের()) // ১ ২
// উচ্চক্রম ফাংশন
ধরি ফল = [১,২,৩,৪].ছাঁকো(ক => ক % ২ == ০).রূপান্তর(ক => ক * ১০) // [২০, ৪০]
E. Classes & objects
| Concept | Keyword (proposed) | Explanation |
|---|---|---|
| Class | শ্রেণি | Blueprint holding fields and methods |
| Constructor | তৈরি | Runs when an object is created: ছাত্র("রিমা", ১) |
| Current object | এটি | The instance inside methods |
| Inheritance | শ্রেণি ক : খ | Single inheritance; the child gets the parent's members |
| Parent access | উর্ধ্ব | Call a parent constructor or method |
| Override | পুনঃলেখ | Marks a method replacing a parent method (compiler-checked) |
| Private | গোপন | Accessible only inside the class; public by default |
| Static | স্থির | Belongs to the class, not an instance |
| Trait / interface | আচরণ / বাস্তবায়ন | Methods a class promises to implement |
| Struct | গঠন | Lightweight data type with value semantics |
আচরণ পরিচয়যোগ্য {
কাজ পরিচয়(): লেখা
}
শ্রেণি প্রাণী {
নাম: লেখা
গোপন বয়স: সংখ্যা
স্থির মোট = ০
তৈরি(নাম, বয়স) {
এটি.নাম = নাম
এটি.বয়স = বয়স
প্রাণী.মোট += ১
}
কাজ শব্দ(): লেখা { ফেরত "..." }
কাজ বয়স_দেখো(): সংখ্যা { ফেরত এটি.বয়স }
}
শ্রেণি কুকুর : প্রাণী বাস্তবায়ন পরিচয়যোগ্য {
তৈরি(নাম, বয়স) { উর্ধ্ব(নাম, বয়স) }
পুনঃলেখ কাজ শব্দ(): লেখা { ফেরত "ঘেউ ঘেউ" }
কাজ পরিচয়(): লেখা { ফেরত "কুকুর {এটি.নাম}" }
}
ধরি টমি = কুকুর("টমি", ৩)
লেখো(টমি.শব্দ()) // ঘেউ ঘেউ
লেখো(টমি.পরিচয়()) // কুকুর টমি
লেখো(প্রাণী.মোট) // ১
// টমি.বয়স → ত্রুটি: 'বয়স' গোপন সদস্য
F. Errors & modules
চেষ্টা {
ধরি ফল = বিভাজন(১০, ০)
} ধরো ত্রুটি {
লেখো("সমস্যা: {ত্রুটি.বার্তা}")
}
কাজ বিভাজন(ক, খ) {
যদি খ == ০ { ছোড়ো ত্রুটি("শূন্য দিয়ে ভাগ") }
ফেরত ক / খ
}
// গণিত.শব্দ ফাইলে
দাও কাজ বর্গ(ন) { ফেরত ন * ন }
// অন্য ফাইলে
আনো বর্গ থেকে "./গণিত"
G. Complete mini-program
শ্রেণি ব্যাংকহিসাব {
গোপন জমা: দশমিক = ০
তৈরি(মালিক: লেখা) { এটি.মালিক = মালিক }
কাজ জমা_দাও(টাকা: দশমিক) {
যদি টাকা <= ০ { ছোড়ো ত্রুটি("টাকার পরিমাণ ভুল") }
এটি.জমা += টাকা
}
কাজ উঠাও(টাকা: দশমিক) {
যদি টাকা > এটি.জমা { ছোড়ো ত্রুটি("পর্যাপ্ত টাকা নেই") }
এটি.জমা -= টাকা
}
কাজ স্থিতি(): দশমিক { ফেরত এটি.জমা }
}
ধরি হিসাব = ব্যাংকহিসাব("রিমা")
হিসাব.জমা_দাও(৫০০০)
চেষ্টা { হিসাব.উঠাও(৭০০০) } ধরো ত্রুটি { লেখো(ত্রুটি.বার্তা) }
লেখো("বর্তমান স্থিতি: {হিসাব.স্থিতি()} টাকা")
5Formal Grammar (EBNF, simplified draft)
program = { statement } ;
statement = varDecl | constDecl | funcDecl | classDecl | ifStmt | whileStmt
| forStmt | matchStmt | tryStmt | returnStmt | importStmt
| exportStmt | traitDecl | structDecl | throwStmt
| "থামো" | "এগোও" | exprStmt ;
varDecl = "ধরি" ident [ ":" type ] "=" expr ;
constDecl = "ধ্রুব" ident [ ":" type ] "=" expr ;
funcDecl = [ "অসমকালীন" ] "কাজ" ident "(" [ params ] ")" [ ":" type ] block ;
ifStmt = "যদি" expr block { "নাহলে" "যদি" expr block } [ "নাহলে" block ] ;
whileStmt = "যতক্ষণ" expr block ;
forStmt = "প্রতিটি" ident "এর" "মধ্যে" expr block ;
matchStmt = "মেলাও" expr "{" { pattern "=>" (expr | block) } "}" ;
tryStmt = "চেষ্টা" block "ধরো" ident block ;
importStmt = "আনো" ident "থেকে" string ;
classDecl = "শ্রেণি" ident [ ":" ident ] [ "বাস্তবায়ন" ident { "," ident } ] "{" { member } "}" ;
member = fieldDecl | ctorDecl | methodDecl ;
fieldDecl = [ "গোপন" ] [ "স্থির" ] ident [ ":" type ] [ "=" expr ] ;
ctorDecl = "তৈরি" "(" [ params ] ")" block ;
methodDecl = [ "গোপন" ] [ "স্থির" ] [ "পুনঃলেখ" ] [ "অসমকালীন" ] "কাজ" ident "(" [ params ] ")" [ ":" type ] block ;
traitDecl = "আচরণ" ident "{" { "কাজ" ident "(" [ params ] ")" [ ":" type ] [ block ] } "}" ;
structDecl = "গঠন" ident "{" { ident ":" type } "}" ;
throwStmt = "ছোড়ো" expr ;
params = param { "," param } ;
param = ident [ ":" type ] [ "=" expr ] | "..." ident ;
args = arg { "," arg } ;
arg = [ ident ":" ] expr ; // named arguments
lambda = ( ident | "(" [ params ] ")" ) "=>" ( expr | block ) ;
block = "{" { statement } "}" ;
expr = assignment ;
assignment = ternary [ ("=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=") assignment ] ; // statement-level only
ternary = nullish [ "?" expr ":" expr ] ;
nullish = logicOr { "??" logicOr } ;
logicOr = logicAnd { "অথবা" logicAnd } ;
logicAnd = equality { "এবং" equality } ;
equality = comparison { ("==" | "!=") comparison } ;
comparison = range { ("<" | "<=" | ">" | ">=" | "ভিতরে") range } ;
range = term [ (".." | "..=") term ] ;
term = factor { ("+" | "-") factor } ;
factor = unary { ("*" | "/" | "//" | "%") unary } ;
unary = ("না" | "-") unary | power ;
power = call [ "**" unary ] ; // right-associative
call = primary { "(" [ args ] ")" | ("." | "?.") ident | "[" expr "]" } ;
primary = number | string | "সত্য" | "মিথ্যা" | "শূন্য" | ident
| "(" expr ")" | list | map | lambda | "এটি" | "উর্ধ্ব" ;
ident = identStart { identPart } ; // letters incl. Bengali block U+0980–U+09FF, plus combining marks
number = digit { digit } [ "." digit { digit } ] ; // digits 0-9 or ০-৯6Core Algorithms
6.1 Normalization
- Read UTF-8; reject invalid bytes with a clear error.
- Apply Unicode NFC to identifiers and keywords (string-literal contents only if configured).
- Canonicalize Bangla variants such as য় (U+09DF) vs য + ় (U+09AF U+09BC).
- Map digits ০–৯ to 0–9 during number scanning.
- Report suspicious ZWJ/ZWNJ with a diagnostic rather than silently dropping them, since they can be meaningful in Bangla spelling.
6.2 Lexer
- Iterate by code point with line/column tracking; grapheme-aware carets in errors.
- Identifier: letter or
_start; continue with letters, combining marks (vowel signs, hasanta), digits. - Look up finished words in the keyword table (Bangla + Latin aliases).
- Scan numbers, strings with
{…}interpolation (nested lexing), operators, comments. - Emit tokens with spans.
6.3 Parser
- Recursive descent for statements.
- Pratt / precedence climbing for expressions.
- Error recovery at statement boundaries to report multiple errors per run.
- Typed AST with source spans for formatter and LSP.
6.4 Semantic analysis
- Scope chain and a resolver pass.
- Detect undefined names, duplicates, misplaced
ফেরত/থামো. - Optional local type inference with a gradual
যেকোনোtype. - Exhaustiveness check for
মেলাও.
6.5 Execution
- Phase A: tree-walking interpreter with environments and closures.
- Phase B: AST to bytecode; stack VM with call frames and upvalues.
- Phase C: optional JavaScript emitter for web targets.
6.6 Bangla diagnostics
- Error code + Bangla message + snippet + caret.
- "Did you mean" via edit distance over keywords and in-scope names.
- Hint the Bangla keyword when an English one is typed (e.g.
if→যদি).
// Pseudocode: lexer
function scan(src):
tokens = []
while not atEnd():
ch = peek()
if isWhitespace(ch): advance(); continue
if ch == '/' and next == '/': skipLineComment(); continue
if isDigit(ch): tokens.add(number()) // 0-9 or ০-৯
else if isIdentStart(ch): w = word(); tokens.add(keywords.get(w) ?? Ident(w))
else if ch == '"': tokens.add(string()) // with {interpolation}
else: tokens.add(operatorOrError())
tokens.add(EOF)
return tokens
// Pseudocode: Pratt parser
function parseExpr(minPrec):
left = parsePrefix()
while prec(peek()) >= minPrec:
op = next()
right = parseExpr(prec(op) + (isRightAssoc(op) ? 0 : 1))
left = Binary(op, left, right)
return left7System Architecture
Implementation language
Recommended: TypeScript for v1 (browser playground and Node, easy JS interop). Alternative: Rust for a later fast VM. Confirm in an architecture review.
Repo layout (proposed)
/spec · /core · /stdlib · /web · /cli · /lsp · /playground · /docs · /tests
File extension
Proposed .শব্দ with ASCII fallback .shobdo for tools that mishandle non-ASCII names.
8Standard Library
| Module | Purpose | Priority |
|---|---|---|
গণিত | Arithmetic, trig, random, constants | P0 |
লেখা | Split, join, replace, grapheme-aware length, Bangla digit conversion | P0 |
তালিকা / মানচিত্র | Collections and functional helpers | P0 |
ফাইল | Files and paths | P1 |
সময় | Dates, times, durations | P1 |
json | Parse / serialize | P1 |
নেটওয়ার্ক | HTTP client | P1 |
পরীক্ষা | Built-in test framework | P1 |
ডাটাবেস | SQLite first, then PostgreSQL | P2 |
সংখ্যা-রূপ | Number to Bangla words, currency formatting | P2 |
9Framework — Shobdo Web
- Routing: declarative Bangla routes with params.
- Templates: HTML templates with Bangla directives, auto-escaping by default.
- Middleware: logging, auth, CORS, rate limiting.
- ORM-lite: models, migrations, query builder.
- Security defaults: CSRF protection, secure headers, input validation, password hashing via vetted libraries (no custom crypto).
- Dev experience: hot reload, Bangla error overlay, scaffolding CLI.
আনো ওয়েব থেকে "শব্দ/ওয়েব"
ধরি অ্যাপ = ওয়েব.নতুন()
অ্যাপ.পথ("/", কাজ(অনুরোধ) {
ফেরত ওয়েব.পাতা("স্বাগতম, শব্দ ওয়েবে!")
})
অ্যাপ.পথ("/ব্যবহারকারী/:আইডি", কাজ(অনুরোধ) {
ধরি ব্যবহারকারী = ডাটাবেস.খোঁজো("ব্যবহারকারী", অনুরোধ.প্যারাম.আইডি)
ফেরত ওয়েব.json(ব্যবহারকারী)
})
অ্যাপ.চালাও(পোর্ট: ৩০০০)
পথ, চালাও, …) are illustrative and will be fixed during spec review.10Developer Tooling
CLI shobdo
run, repl, fmt, test, build, new, add, doc.
REPL
Multi-line, history, Bangla errors, Latin-alias input mode.
Playground
Browser editor + runner, shareable links, built-in lessons.
Language Server
Diagnostics, completion, hover, go-to-definition, rename.
Editor support
VS Code extension first: highlighting, snippets, transliteration helper.
Package manager
Manifest, semver, lockfile; start with git/URL deps, registry later.
Formatter & linter
Canonical style; normalizes aliases to Bangla keywords.
Docs
Full Bangla docs, tutorial book, API reference from doc comments.
11Non-Functional Requirements
| Area | Requirement (proposed) |
|---|---|
| Correctness | Deterministic spec; conformance suite; tests for every keyword/feature. |
| Performance | Benchmarks early; the bytecode VM replaces the tree-walker only after a measured win. |
| Unicode | NFC, grapheme-aware string ops, correct conjunct/hasanta handling, ZWJ/ZWNJ. |
| Accessibility | Docs/playground follow WCAG; font stack with good Bangla conjunct rendering. |
| Security | Sandboxed playground; no host access without explicit permission flags; dependency audit in CI. |
| Portability | Linux, macOS, Windows and browser. |
| Stability | Semantic versioning; RFC process for language changes; deprecation policy. |
| i18n | Bangla-first; message catalog design allows other languages later. |
| Licensing | Permissive open-source license (decision pending). |
12Roadmap & Milestones (estimates; adjust to team size)
M0 · Foundations
- Name, license, repo
- Keyword review
- Spec v0.1 & EBNF
- Test corpus
M1 · Core Interpreter
- Normalizer, lexer, parser
- Tree-walking interpreter
- REPL, Bangla errors
- Core stdlib
M2 · Language Depth
- Classes/traits, modules
- Pattern matching
- Optional types
- Formatter, test runner
M3 · Perf & Tooling
- Bytecode VM / JS emitter
- LSP, VS Code ext.
- Playground
- Package manager
M4 · Framework & 1.0
- Shobdo Web
- DB layer
- Docs & tutorial
- Security review, 1.0
13Risks & Mitigations
| Risk | Impact | Mitigation |
|---|---|---|
| Slow typing of Bangla code | High | Latin aliases, editor transliteration helper, formatter normalization |
| Same word, different code points | High | Strict NFC + variant canonicalization, fuzz tests |
| Poor font/editor rendering of conjuncts | Medium | Recommend tested fonts; playground ships a suitable font |
| Tiny initial ecosystem | High | JS/Python interop, transpile target, strong stdlib |
| Keyword choices disliked | Medium | Linguist/teacher review, public RFC, configurable alias table |
| Scope creep | High | Strict P0–P3 priorities; stage gates per milestone |
| Maintainer burnout | Medium | Contribution guide, good-first-issues, governance doc |
14Master Checklists (interactive; progress saved in this browser)
15Decisions (zero-budget)
| Question | Decision | Why |
|---|---|---|
| Name | Keep শব্দ / Shobdo as the working name | Availability is unverified. Before any public launch, check the GitHub org, domain, npm/PyPI names and trademark search. The first checks are free. |
| Implementation language (v1) | TypeScript | Free tooling, runs in Node and the browser (free playground), easy JS interop, large contributor pool. Rust can come later for a fast VM. |
| Block syntax | Braces { } | Bangla text mixes combining marks, so whitespace-sensitive code is fragile. Braces make parser errors clearer and the grammar simpler. |
| Digit style | Bangla digits by default for console display; Latin accepted everywhere in source. JSON, files and network always use Latin. | Fits the Bangla-first goal without breaking data interchange. A config flag switches the display style. |
| Object model | Both: single inheritance + traits (composition preferred) | Familiar to learners, avoids multiple-inheritance ambiguity. |
| Governance & license | Deferred. Founders act as maintainers for now; language changes are discussed as public issues (lightweight RFC). | No funding. Decide the license before accepting outside contributions or publishing code: without one, others have no legal right to reuse it. |
| Keyword review | All three groups: a volunteer panel of 1–2 linguists, 2 teachers and 2–3 developers, plus public feedback on the keyword RFC | Linguists check correctness, teachers check learnability, developers check typing cost. All free to start. |