Rethinking C++ Coroutines: A Punk Rock Approach
Explore unconventional C++ coroutines with Ivan Čukić's rebellious take on breaking programming norms.
Written by AI. Dev Kapoor

Photo: Meeting Cpp / YouTube
Rethinking C++ Coroutines: A Punk Rock Approach
Ivan Čukić's recent talk at Meeting C++ 2025, cheekily titled "(Don't) use coroutines for this," encourages a rebellious reexamination of coroutines in C++. In a field where structured concurrency and asynchronous execution often dominate discussions, Čukić presents a vision of coroutines as a versatile flow control feature, akin to loops and functions, that can simplify code well beyond their conventional usage.
Coroutines Beyond Concurrency
Čukić opens with a playful admission, "I'm now in a rebellious state," setting the stage for what he dubs "punk rock C++." His approach is to challenge the norms and explore coroutines' potential beyond their typical application in concurrency. He suggests, "Coroutines are just another flow control language feature," emphasizing the need to rethink their role within C++.
A central theme in Čukić's talk is the idea of stackless recursion. Traditional recursion can lead to stack overflow, a limitation Čukić seeks to overcome by implementing coroutines in a way that avoids the stack. He describes this as "going against the rule but without breaking any rules," a nod to the punk ethos of subverting the status quo.
Disabling Optimizations: A Double-Edged Sword
Čukić explains that compiler optimizations often undermine the stackless nature of coroutines. By disabling these optimizations, particularly the "Halo"—Heap Allocation Illusion Optimization—programmers can maintain stackless behavior. However, this approach complicates implementation and may not be advisable for production code. Čukić humorously warns, "You should not do this," underscoring the experimental nature of his suggestions.
Quote Highlights
- "The only thing that we've done so far is just to forbid every single part of the coroutine to end up on the stack."
- "If we created stackless coroutines and disabled the thing that doesn’t make them stackless, then we should be fine. Nope."
- "Coroutines are a mechanism to redefine how parts of the C++ abstract machine works."
Debugging and Logging
One of the practical applications Čukić advocates is enhancing debugging through meticulous logging. By leveraging coroutines to hook into function call events, developers can create detailed logs that capture the flow of execution. This can provide invaluable insights, especially when dealing with complex recursive calls.
Balancing Creativity and Best Practices
The talk is peppered with humor and cautionary tales about the pitfalls of straying too far from best practices. Čukić acknowledges the allure of innovative solutions but stresses the importance of a balanced approach, where creativity does not compromise code reliability. His rebellious stance is both a critique of rigid programming conventions and a call to explore the boundaries of C++.
The Bigger Picture
Čukić's exploration reflects broader tensions in the programming world. As developers, we are often caught between adhering to established norms and venturing into uncharted territory. This talk serves as a reminder that questioning conventions can lead to novel insights, but also that these insights must be tempered with pragmatism.
Coroutines Without the Corporate Gloss
Ivan Čukić's punk rock take on C++ coroutines invites developers to rethink their assumptions and explore the full potential of the language's features. While his methods may not be suitable for every project, they highlight the importance of understanding the underlying mechanics of execution. In an industry that sometimes feels as rigid as the code it produces, Čukić's rebellious spirit is a refreshing call to innovate and challenge the norms.
By Dev Kapoor
We Watch Tech YouTube So You Don't Have To
Get the week's best tech insights, summarized and delivered to your inbox. No fluff, no spam.
More Like This
Browser Use CLI Gives AI Agents Web Control—For Free
New Browser Use CLI tool lets AI agents control browsers with plain English commands. Free, fast, and works with Claude Code—but raises questions about automation.
Dozzle: The Docker Log Viewer That Does Less (On Purpose)
Dozzle is a 7MB tool that streams Docker logs to your browser. No storage, no database, no complexity. Better Stack shows why that's the point.
Pencil.dev Brings Free Design-to-Code Canvas to Claude
Pencil.dev's new desktop app connects design and code through Claude's MCP integration, offering a free alternative to Figma for AI-assisted frontend development.
C++ Safety: Balancing Performance and Security
Explore C++ safety issues and modern programming practices to enhance security without compromising performance.
Musk's Digital Optimus: AGI Vision Meets Project Chaos
Elon Musk announces Digital Optimus AI to automate office work, but leaked reports reveal the project collapsed at xAI. What's really happening?
When Three MacBooks Beat One: The Distributed AI Experiment
Developer Alex Ziskind clusters three M5 Max MacBook Pros to run AI models too large for any single machine. The results reveal hard limits.
Anthropic's Opus 4.7: When Safety Guardrails Lobotomize the Model
Anthropic's Opus 4.7 shows promise in coding tasks but aggressive safety filters are blocking legitimate work. Is the tooling worse than the model?
RAG·vector embedding
2026-04-15This article is indexed as a 1536-dimensional vector for semantic retrieval. Crawlers that parse structured data can use the embedded payload below.