Bnlang · Programming Language

About Bnlang

Bnlang is a multilingual programming language and runtime created primarily for Bangladesh. It lets developers think and learn in their mother tongue—বাংলা—collaborate in Banglish, and ship in English without changing semantics, tooling, or production readiness.

Why Bnlang (for Bangladesh)

People think and work across languages—learn in Bangla, discuss in Banglish, search and ship in English. Traditional languages force one surface form; Bnlang adapts to you. Teach, learn, prototype, and run in production using the script you’re most comfortable with—without forking the ecosystem or sacrificing engineering rigor.

  • Onboarding speed: the same example exists in three surface forms with identical behavior—English, বাংলা, and Banglish.
  • Review clarity: diagnostics and formatting keep mixed-language code legible and consistent.
  • No translation tax: learn core ideas in Bangla, ship to production in English if required.
What this page covers (and why)

Each section explains the rationale behind language design, runtime, interop, and community. It’s written for teachers, adopters, and contributors who need to assess Bnlang for real projects.

Project status
bnl-vscode, bnl-web (website), and bpm are open source and free. The main Bnlang runtime source is private today (planned to open source later).
Cost
Bnlang distributions and tooling are completely free to use—no license fees, no hidden charges. Individuals, schools, and companies can adopt it without cost barriers, making it accessible for learning, collaboration, and production deployment.

How it works (why these choices)

We choose a pragmatic stack for Bangladesh today: fast iteration on a modern V8 runtime, clean interop with C++ for performance-critical paths, and robust libraries like libuv, OpenSSL, llhttp, and zlib—so schools and companies can adopt incrementally.

Frontend: Lexer, Parser, Checker
  • Trilingual tokens normalized (Bangla/Banglish/English) → language-agnostic IR.
  • Static checks for scope, arity, and optional type hints.
  • Formatter ensures deterministic layout across scripts.
Backend: V8 Runtime
  • IR → JavaScript transpilation; JavaScript executes on the Google V8 Engine.
  • Module resolution via BPM + lockfiles for reproducible builds.
  • Source maps and readable diagnostics for first-class debugging.

Compilation pipeline: Bnlang transpiles to JavaScript and runs on the V8 engine for execution.

Native Path: C++
  • Performance-critical functions (crypto, parsing, image ops) in C++.
  • Stable ABI boundary with prebuilt binaries per platform.
  • FFI helpers to call system libraries safely.
Packages & Stdlib (why)
BPM provides integrity checks and semantic versions. The standard library covers I/O, HTTP, crypto, and text utilities with identical APIs across three surface forms—so lessons don’t fragment.
Tooling (why)
Formatter, test runner, docs generator, and scaffolding ship with the language. Upgrades stay predictable in classrooms and CI because tools evolve together.
Interop (why not a walled garden)
Leverage existing C/C++ libraries; export clean interfaces. Transpile to JavaScript and run on V8 for broad deployment.

Runtime Stack (under the hood)

Pragmatic, portable, and proven components for Bangladesh today.

C++
Core of the Bnlang runtime, written in modern C++ for speed and portability. It powers native extensions, FFI bridges, and low-level system integration.
V8
Google’s high-performance JavaScript engine. Bnlang transpiles to JavaScript and runs on V8, gaining JIT compilation, fast GC, and proven production stability.
libuv
Cross-platform async I/O library used heavily in Bnlang for networking, filesystem access, timers, event loops, and process management.
OpenSSL
Provides TLS, SSL, and cryptography. Bnlang relies on it for secure communications, encryption, hashing, and certificate handling.
llhttp
Fast, lightweight HTTP parser in C. Integrated into Bnlang to handle HTTP traffic efficiently and securely for servers and clients.
zlib
Battle-tested compression library. Used for gzip/deflate support, package compression in BPM, and general data processing.

Language design (why it feels right)

The parser accepts three surface forms; the compiler treats them equally. You teach and work in the language you think in—without a 'special mode' of code.

Trilingual Keywords & APIs
Control flow and declarations exist in Bangla/Banglish/English; tooling normalizes for analysis and output.
Safety & Clarity
Explicit imports, predictable scoping, strict formatter, and readable errors keep reviews focused on logic.
Accessibility-first
Unicode-safe punctuation, examples aligned with common Bangla keyboard habits, and bilingual diagnostics.

Accessibility for Bangladesh (why it’s a priority)

Language Reality
Learn in Bangla, discuss in Banglish, search in English. Bnlang meets all three without 'mode switching'.
Fonts & Unicode
Compiler and formatter handle Bangla punctuation/numerals; docs recommend widely available fonts.
Low Bandwidth & Power
Small downloads, deterministic installs, and offline docs reduce friction in real classrooms.

Interop & adoption (why not reinvent the world)

Import / Export
Leverage existing C/C++ libraries; export clean interfaces. Deploy on any platform supported by the runtime.
Incremental Migration
Start with scripts or one service; keep the rest in existing languages. Move hot paths to C++ only when needed.
Deterministic Builds
Lockfiles and checksums make CI and lab machines behave the same—even with flaky connectivity.

Governance, license & security (why you can trust it)

Open Governance
Community RFCs shape changes. Breaking changes ship with migration guides and tool support.
Licensing
bnl-vscode, bnl-web, and bpm are open source; the main runtime source is private for now (planned open source). All are free to use.
Security & Telemetry
Responsible disclosure, signed artifacts, and optional, privacy-respecting telemetry (opt-out anytime).

Roadmap (near-term priorities)

v1.x Stability
Lock core syntax, finalize stdlib modules, and announce LTS windows for educators and companies.
Tooling Depth
Language server polish, better editor integration, and improved debug/trace ergonomics.
Native Performance
Expand C++ modules, profile hot paths, and provide prebuilt binaries for all supported OS/arch pairs.

Community & Governance

Join discussions, propose RFCs, and help shape the roadmap. From documentation to core packages—every contribution matters.