I implemented generics in my programming language
Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.
Want to reach these readers? Sponsor an issue.
It took a while to implement, though now I have generic functions working in Axe. Documentation, repository and site attached.
HN · launched Dec 15, 2025 · 38 upvotes (top 22%) · 0 views
Niche: programming languages and interpreters · 161 launches, 2 in the last 7 days ▼ -75% · Explore this niche →
Category and tags
- Horizontal
- Dev tools
- Developer
- Not AI
- Hobby / open-source project
Visit website ↗ Source listing ↗
More like this: all 161 launches in programming languages and interpreters →
Could you build this?
No Implementing generics, monomorphization, and compile-time type specialization into an existing programming language compiler requires deep compiler design and type theory expertise.
What it would actually take: Building generics in a native compiler requires modifying the AST, parser, and semantic analysis phases to handle parameterized types and constraint solving. The backend must implement either runtime type dispatch or a full monomorphization engine that clones and specializes intermediate representations (IR) per concrete type, handling nested generics, recursion, and mangled symbol generation.
Discussion
20 comments analyzed.
Competitors mentioned: Haxe, Zig, C++ generics, Java generics, Rust type system
Concerns raised: Implementation is ad-hoc polymorphism, not true parametric polymorphism, Breaks parametricity - functions behave differently based on type, Type-checking then ignoring it with runtime type switching is a code smell, All implementations must be in single source file, Doesn't generate compiler errors for unsupported types
Feature requests: Support separate compilation with explicit instantiations, Compiler errors for unsupported type calls, True parametric polymorphism without type-based branching, Type classes for ad-hoc polymorphism handling
Competitors
Other products that read as similar to this one : 122 launches clear the similarity bar, closest 8 shown.
Attention rank: #37 of 123 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 47 days after the earliest competitor.
- fast-generic-new · github · 2026-11-06 · 149 upvotes · similarity 0.51
- Genotype: language that compiles to idiomatic TS, Rust and Python · hn · 2026-09-08 · 9 upvotes · similarity 0.48
- SharpTS · hn · 2026-01-09 · 6 upvotes · similarity 0.47
- G# –> a new dotnet language like Go/Swift/Kotlin with C# interop · hn · 2026-06-15 · 9 upvotes · similarity 0.46
- Fuse · hn · 2026-08-02 · 121 upvotes · similarity 0.46
- Axe · hn · 2025-11-24 · 16 upvotes · similarity 0.45
- Typical is TypeScript with type-safety at runtime · hn · 2026-01-11 · 8 upvotes · similarity 0.44
- soml-typescript-types · github · 2026-11-01 · 13 upvotes · similarity 0.43
The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.