A new way to program.
How to install?
irm https://raw.githubusercontent.com/Angel25051/d-lang/main/installers/installar.ps1 | iex |
Titan Engine v1.0 Release — Declaration of Syntactic Sovereignty Author: Ángel The D language is complete, autonomous, and absolute. Everything that works in compilation is enshrined in its syntax.
D Language Syntax
Every form, every token, every reserved word, every operator, every control structure, every valid construct: all of this constitutes the official D syntax. This is the formal documentation.
High-Level Constructs
The D language defines new, more expressive, powerful, and safer forms:
type — structure definition
def — typed function declaration
own — explicit memory ownership
Memory is freed upon exiting the block.
print() and println() — printing with interpolation
Access standard and custom modules.
Anonymous {} Blocks and Free Nesting
D Language Operators
- Arithmetic: +, -, *, /, %
- Increment/Decrement: ++, --
- Relational: ==, !=, >, <, >=, <=
- Logical: &&, ||, !
- Bitwise: &, |, ^, ~, <<, >>
- Assignment: =, +=, -=, *=, /=, %=, &=, |=, ^=, <<=, >>=
- Pointers: *, &, ->
- Comma: ,
- Subscript: []
- Ternary conditional: ? :
- Member access: .
- Cast: (type)
- Sizeof: sizeof
- Addressing: &
Precedence and associativity
D respects the universal operator precedence table, as recognized by compilers.
Reserved Words and Recognized Constructs
Fundamental Macros
Conditional Compilation
Technical Extensions Supported by D
Calling Conventions
Standard D Language Headers
Full C Library Support
D++lang is fully compatible with all C libraries — standard or external — as long as they are correctly installed on the system and available at compile time.
You may include any C header and call its functions directly:
#include <math.h> #include <raylib.h> def int main() { println(f"sin(0.5) = {sin(0.5)}"); InitWindow(800, 600, "Raylib in D++lang"); CloseWindow(); return 0; } **This is D. No copying, no inheritance. Everything that compiles in D is from D.** **D is a sovereign language. It contains everything.**The D++lang Standard Library is designed to be a collection of essential modules similar to Python’s standard library. Our goal is to encourage rapid development and widespread adoption by making it easy for developers to integrate with external libraries and build robust applications.
Key Modules
- math — Provides mathematical functions such as sqrt(), sin(), and cos().
- os — Offers functions for interacting with the operating system (file I/O, process management, etc.).
- io — Contains functions and utilities for input/output operations.
- string — Utilities for string manipulation and formatting.
- time — Functions to work with dates, times, and timing.
- random — Tools for generating random numbers and handling randomness.
Design Principles
- Legibility & Modern Syntax: D++lang boasts a clear, modern syntax with keywords like type, def, and explicit type declarations that keep code both readable and closely aligned with machine-level operations.
- Explicit Type Declarations: While ensuring a syntax that enhances readability, all types are declared explicitly (e.g., int) to maintain precision and performance.
- C Compatibility: The language is fully compatible with C libraries. This means you can supercharge your applications with an extensive range of pre-existing libraries.
- Rapid Library Integration: The standard library not only eases the development of in-house modules but also paves the way to quickly “wrap” or integrate external libraries, promoting a fast and efficient development cycle.
- Modular Approach: A modular design ensures that each component functions independently while integrating smoothly with the rest of the ecosystem.
How To Contribute
We want D++lang to become not only a powerful language but also one with a strong, vibrant community. Here’s how you can help:
- Submit New Modules: Contribute modules that fill gaps or extend current functionality.
- Enhance Existing Modules: Improve documentation, add test cases, or optimize performance.
- Share Your Projects: Let us know how you’re using the standard library in your projects.
With a community-driven effort, D++lang aims to surpass languages like C by blending simplicity, control, and rapid integration of libraries—even if its user base starts small.
Happy coding with D++lang!