Introduction to Dlang
A fast, standalone native programming language for mathematics, trading research, physics, and everyday applications.
Dlang is a standalone programming language that compiles to native executables. It pairs clean, readable syntax with strict runtime type safety, optional static type annotations, and a batteries-included standard library.
Why Dlang?
- Native performance: Compiles
.dlprograms to standalone executables with deterministic reference-counted memory — no external runtime required to distribute your apps. - Readable syntax: Supports both clean indentation-based blocks and explicit
endterminators. - Strict safety: Dynamic values with strict operators — no silent implicit coercions between numbers, strings, or booleans.
- Gradual static types: Add optional type annotations (
x: int = 10,list<T>,T1 | T2unions) and validate them ahead of time withdlang check. - Batteries included: Built-in modules for
math,array,text,regex,fs,http,json,csv,sqlite,async, and immediate-mode desktopui.
A Taste of Dlang
hello.dl
fn greet(name: string) -> string
return "Hello, " + name + "!"
end
show greet("Dlang")
show "2 ^ 10 = " + to_string(2 ^ 10)Built with Dlang
This documentation site itself is written and served in Dlang using the built-in
http, fs, text, and json modules.