Tacopy
Tail Call Optimization for Python
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.
HN · launched Nov 30, 2025 · 95 upvotes (top 9%) · 0 views
Niche: code and binary analysis tools · 118 launches, 4 in the last 7 days ▼ -56% · Explore this niche →
Category and tags
- Horizontal
- Dev tools
- Developer
- Not AI
- Hobby / open-source project
Visit website ↗ Source listing ↗
More like this: all 118 launches in code and binary analysis tools →
Could you build this?
No Tail Call Optimization (TCO) for Python requires modifying the CPython bytecode, manipulating the call stack frames, or writing custom AST/bytecode transformers. This demands deep, specialized understanding of Python's runtime internals and CPython bytecode execution.
What it would actually take: A real implementation requires either an AST transformer that rewrites tail-recursive functions into iterative while-loops or a low-level bytecode manipulation library (like bytecode or dis/opcode hacking) that inspects frames and replaces CALL/RETURN opcodes with JUMP instructions. It requires specialized knowledge of Python virtual machine internals, frame management, and edge-case preservation of stack traces and sys._getframe callers.
Discussion
20 comments analyzed.
Competitors mentioned: PyPy (alternative performance optimization approach), JavaScript engines (Safari JSC, V8, WebAssembly), Scheme/ML/PureScript (functional languages with native TCO)
Concerns raised: Breaks semantics of tail recursion within loops, Only optimizes direct self-recursion, not mutual recursion, No true Tail Call Optimization (TCO), only tail recursion optimization, Stack traces become messy (JavaScript PTC experience), Less idiomatic than loops in mainstream Python culture
Feature requests: Support mutual recursion between functions, Support true TCO with trampolines for any tail position calls, Handle tail recursion within loops correctly
Competitors
Other products that read as similar to this one : 1115 launches clear the similarity bar, closest 8 shown.
Attention rank: #101 of 1116 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 30 days after the earliest competitor.
- Tailsnitch · hn · 2026-01-05 · 280 upvotes · similarity 0.53
- tailmux · github · 2026-09-28 · 8 upvotes · similarity 0.51
- Cachekit · hn · 2026-01-14 · 47 upvotes · similarity 0.49
- Katharos Functional programming and CSP-style concurrency for Python · hn · 2026-08-02 · 37 upvotes · similarity 0.48
- Powerful pipeline syntax for IPython and Jupyter · hn · 2026-01-04 · 5 upvotes · similarity 0.48
- Ru-Jev · hn · 2026-11-06 · 5 upvotes · similarity 0.48
- Using Golang to Speed Up Monte Carlo Simulations · hn · 2026-08-26 · 5 upvotes · similarity 0.48
- agilelimiter · github · 2026-10-12 · 19 upvotes · similarity 0.47
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.