https://github.com/bichanna/dud
A programming language infused with lots of personal preferences for syntax, safety, and metaprogramming
https://github.com/bichanna/dud
c-language compiler language programming-language transpiler
Last synced: about 2 months ago
JSON representation
A programming language infused with lots of personal preferences for syntax, safety, and metaprogramming
- Host: GitHub
- URL: https://github.com/bichanna/dud
- Owner: bichanna
- License: apache-2.0
- Created: 2026-01-18T23:58:24.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-02-04T00:14:21.000Z (5 months ago)
- Last Synced: 2026-02-04T11:52:30.622Z (5 months ago)
- Topics: c-language, compiler, language, programming-language, transpiler
- Language: C
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Notice: NOTICE
Awesome Lists containing this project
README
# dud
dud is basically C for people who are lazy but want a fraction of the power of C. It's a programming language infused with lots of personal preferences for syntax, safety, and metaprogramming.
## Goals
- Basically C with a bit nicer syntax
- Compiles to standard C code, ensuring compatibility
- Automatic memory management through reference counting that handle circular references
- Built-in implementations of dynamic arrays, hash maps, and other useful things
- Use functions, types, and other stuff from C without too much fuss
- Generics and protocols!
- Zig-like modules, no more header files!
## Examples
```
type User = struct {
id: i32,
name: String,
boss: ^User,
}
fn main() {
// Stack allocation (No RC overhead, fast!)
let me: User = User(1, "bichanna", null);
// Heap allocation (Automatically reference counted)
let sister: ^User = heap User(2, "sister", null); // allocating on heap
// Look Ma, no '->'!
me.boss = sister;
println("Hi! My name is {} and my boss is {}", me.name, me.boss.name);
}
```