---
title: "Meaning & Key Takeaway of: You can do anything with stacks and…"
description: "\"“You can do anything with stacks and iteration that you can do with recursion.”\" — Steve McConnell"
image: "https://sms4smile.com/quotes/i/1d5/steve-mcconnell-11957_recursion_you-can-do-anything-with-stacks-and-iter_1594034.png"
---

#  You can do anything with stacks and iteration that you can…

![“You can do anything with stacks and iteration that you can do with recursion.” quote by Steve McConnell](https://sms4smile.com/quotes/i/1d5/steve-mcconnell-11957_recursion_you-can-do-anything-with-stacks-and-iter_1594034.png)   [Download](https://sms4smile.com/quotes/i/1d5/steve-mcconnell-11957_recursion_you-can-do-anything-with-stacks-and-iter_1594034.png) [Open image](https://sms4smile.com/quotes/i/1d5/steve-mcconnell-11957_recursion_you-can-do-anything-with-stacks-and-iter_1594034.png)

> ““You can do anything with stacks and iteration that you can do with recursion.””

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

## About This Quote

This interpretation was drafted with AI assistance. It is one reading of the quote, not the author's own explanation.

Iterative processes can achieve the same results as recursion, often more efficiently.

**In simple terms:** Loops can replace recursion.

Key Takeaway

Use iteration for clarity and performance.

Themes

programming iteration recursion efficiency

Mood

analytical practical

Type

technical advice

When to use this quote

- software development
- performance tuning
- educational teaching
- code refactoring

Key Concepts

Algorithmic design computational complexity

Questions to Reflect On

- When is recursion preferable?
- How does iteration affect code readability?

A Different Perspective

Some problems are naturally recursive and harder to convert.

★ ★ ★ ★ ★   No ratings yet

[Recursion](https://sms4smile.com/quotes/about/recursion/) [Stacks](https://sms4smile.com/quotes/about/stacks/)

## Related quotes

> [Iteration, not ideation, is the most important part of early stage entrepreneurship. You have to have a lot of ideas - a lot of…](https://sms4smile.com/quotes/marc-randolph/iteration-not-ideation-is-the-most-important-part-of-early-stage/)

[Marc Randolph](https://sms4smile.com/quotes/author/marc-randolph/)

> [“Interestingly, the iteration protocol is even more pervasive in Python today than the examples so far have demonstrated — essentially everything in Python’s built-in…](https://sms4smile.com/quotes/mark-lutz/interestingly-the-iteration-protocol-is-even-more-pervasive-in-python/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [Few ideas work on the first try. Iteration is key to innovation.](https://sms4smile.com/quotes/sebastian-thrun/few-ideas-work-on-the-first-try-iteration-is-key-to-innovation/)

[Sebastian Thrun](https://sms4smile.com/quotes/author/sebastian-thrun/)

> [I haven't seen any claim that Piraha lacks recursion, that is, that there are a finite number of sentences or sentence frames. If that's…](https://sms4smile.com/quotes/noam-chomsky/i-haven-t-seen-any-claim-that-piraha-lacks-recursion-that-is-that/)

[Noam Chomsky](https://sms4smile.com/quotes/author/noam-chomsky/)

> [In another thirty years people will laugh at anyone who tries to invent a language without closures, just as they'll laugh now at anyone…](https://sms4smile.com/quotes/mark-jason-dominus/in-another-thirty-years-people-will-laugh-at-anyone-who-tries-to/)

[Mark Jason Dominus](https://sms4smile.com/quotes/author/mark-jason-dominus/)

> [We live in strange times. We also live in strange places: each in a universe of our own. The people with whom we populate…](https://sms4smile.com/quotes/douglas-adams/we-live-in-strange-times-we-also-live-in-strange-places-each-in-a-2/)

[Douglas Adams](https://sms4smile.com/quotes/author/douglas-adams/)

> [“To understand what recursion is, you must first understand recursion.”](https://sms4smile.com/quotes/anonymous/to-understand-what-recursion-is-you-must-first-understand-recursion/)

[Anonymous](https://sms4smile.com/quotes/author/anonymous/)

> [The proverbial German phenomenon of the verb-at-the-end about which droll tales of absentminded professors who would begin a sentence, ramble on for an entire…](https://sms4smile.com/quotes/douglas-hofstadter/the-proverbial-german-phenomenon-of-the-verb-at-the-end-about-which/)

[Douglas Hofstadter](https://sms4smile.com/quotes/author/douglas-hofstadter/)

> [To understand recursion, one must first understand recursion.](https://sms4smile.com/quotes/stephen-hawking/to-understand-recursion-one-must-first-understand-recursion/)

[Stephen Hawking](https://sms4smile.com/quotes/author/stephen-hawking/)

> [“4.19. Dedekind's approach is a singular combination of Descartes' Cogito and the idea of the idea in Spinoza. The starting point is the very…](https://sms4smile.com/quotes/alain-badiou/4-19-dedekind-s-approach-is-a-singular-combination-of-descartes/)

[Alain Badiou](https://sms4smile.com/quotes/author/alain-badiou/)

> [“I put an apple on my table. Then I put myself inside this apple. What tranquility!”](https://sms4smile.com/quotes/henri-michaux/i-put-an-apple-on-my-table-then-i-put-myself-inside-this-apple-what/)

[Henri Michaux](https://sms4smile.com/quotes/author/henri-michaux/)

> [This does not mean that I fail to recognise that Lisp is still #1 for key algorithmic techniques such as recursion and condescension. It…](https://sms4smile.com/quotes/verity-stob/this-does-not-mean-that-i-fail-to-recognise-that-lisp-is-still-1-for/)

Verity Stob

> [If you already know what recursion is, just remember the answer. Otherwise, find someone who is standing closer to Douglas Hofstadter than you are;…](https://sms4smile.com/quotes/andrew-plotkin/if-you-already-know-what-recursion-is-just-remember-the-answer/)

[Andrew Plotkin](https://sms4smile.com/quotes/author/andrew-plotkin/)

> [Lisp is still #1 for key algorithmic techniques such as recursion and condescension.](https://sms4smile.com/quotes/verity-stob/lisp-is-still-1-for-key-algorithmic-techniques-such-as-recursion-and/)

Verity Stob

> [I gotta couple reasons you can call me the boss. Il'l drop a couple stacks and watch your ass get lost.](https://sms4smile.com/quotes/yung-joc/i-gotta-couple-reasons-you-can-call-me-the-boss-il-l-drop-a-couple/)

[Yung Joc](https://sms4smile.com/quotes/author/yung-joc/)

## More by Steve McConnell

> [“it's done by creating 25 times as many dirty tests”](https://sms4smile.com/quotes/steve-mcconnell/it-s-done-by-creating-25-times-as-many-dirty-tests/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [... programming requires more concentration than other activities. It's the reason programmers get upset about 'quick interruptions' - such interruptions are tantamount to asking…](https://sms4smile.com/quotes/steve-mcconnell/programming-requires-more-concentration-than-other-activities-it-s/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [The job of the average manager requires a shift in focus every few minutes. The job of the average software developer requires that the…](https://sms4smile.com/quotes/steve-mcconnell/the-job-of-the-average-manager-requires-a-shift-in-focus-every-few/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [“the road to programming hell is paved with global variables,”](https://sms4smile.com/quotes/steve-mcconnell/the-road-to-programming-hell-is-paved-with-global-variables/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [“usually more time is spent in making good-looking presentation slides than in improving the quality of the software.”](https://sms4smile.com/quotes/steve-mcconnell/usually-more-time-is-spent-in-making-good-looking-presentation-slides/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is…](https://sms4smile.com/quotes/steve-mcconnell/it-s-hard-enough-to-find-an-error-in-your-code-when-you-re-looking/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [“the error rate in manual testing is comparable to the bug rate in the code being tested.”](https://sms4smile.com/quotes/steve-mcconnell/the-error-rate-in-manual-testing-is-comparable-to-the-bug-rate-in-the/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [“few people can understand more than three levels of nested ifs”](https://sms4smile.com/quotes/steve-mcconnell/few-people-can-understand-more-than-three-levels-of-nested-ifs/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [ “\[...\] you shouldn't be uneasy about any parts of the architecture. It shouldn't contain anything just to please the boss. It shouldn't contain anything… ](https://sms4smile.com/quotes/steve-mcconnell/you-shouldn-t-be-uneasy-about-any-parts-of-the-architecture-it/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [It's OK to figure out murder mysteries, but you shouldn't need to figure out code. You should be able to read it.](https://sms4smile.com/quotes/steve-mcconnell/it-s-ok-to-figure-out-murder-mysteries-but-you-shouldn-t-need-to/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [“Programmers working with high-level languages achieve better productivity and quality than those working with lower-level languages. Languages such as C++, Java, Smalltalk, and Visual…](https://sms4smile.com/quotes/steve-mcconnell/programmers-working-with-high-level-languages-achieve-better/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [The trouble with quick and dirty is that dirty remains long after quick has been forgotten.](https://sms4smile.com/quotes/steve-mcconnell/the-trouble-with-quick-and-dirty-is-that-dirty-remains-long-after/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [“Be sure that the names you choose favor read-time convenience over write-time convenience.”](https://sms4smile.com/quotes/steve-mcconnell/be-sure-that-the-names-you-choose-favor-read-time-convenience-over/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [Even when you have skilled, motivated, hard-working people, the wrong team structure can undercut their efforts instead of catapulting them to success. A poor…](https://sms4smile.com/quotes/steve-mcconnell/even-when-you-have-skilled-motivated-hard-working-people-the-wrong/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [A typical software project can present more opportunities to learn from mistakes than some people get in a lifetime.](https://sms4smile.com/quotes/steve-mcconnell/a-typical-software-project-can-present-more-opportunities-to-learn/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

[Explore all 57 Steve McConnell quotes ](https://sms4smile.com/quotes/author/steve-mcconnell/)

## More Recursion quotes

> [Lisp is still #1 for key algorithmic techniques such as recursion and condescension.](https://sms4smile.com/quotes/verity-stob/lisp-is-still-1-for-key-algorithmic-techniques-such-as-recursion-and/)

Verity Stob

> [If you already know what recursion is, just remember the answer. Otherwise, find someone who is standing closer to Douglas Hofstadter than you are;…](https://sms4smile.com/quotes/andrew-plotkin/if-you-already-know-what-recursion-is-just-remember-the-answer/)

[Andrew Plotkin](https://sms4smile.com/quotes/author/andrew-plotkin/)

> [This does not mean that I fail to recognise that Lisp is still #1 for key algorithmic techniques such as recursion and condescension. It…](https://sms4smile.com/quotes/verity-stob/this-does-not-mean-that-i-fail-to-recognise-that-lisp-is-still-1-for/)

Verity Stob

> [“I put an apple on my table. Then I put myself inside this apple. What tranquility!”](https://sms4smile.com/quotes/henri-michaux/i-put-an-apple-on-my-table-then-i-put-myself-inside-this-apple-what/)

[Henri Michaux](https://sms4smile.com/quotes/author/henri-michaux/)

> [“4.19. Dedekind's approach is a singular combination of Descartes' Cogito and the idea of the idea in Spinoza. The starting point is the very…](https://sms4smile.com/quotes/alain-badiou/4-19-dedekind-s-approach-is-a-singular-combination-of-descartes/)

[Alain Badiou](https://sms4smile.com/quotes/author/alain-badiou/)

> [To understand recursion, one must first understand recursion.](https://sms4smile.com/quotes/stephen-hawking/to-understand-recursion-one-must-first-understand-recursion/)

[Stephen Hawking](https://sms4smile.com/quotes/author/stephen-hawking/)

> [The proverbial German phenomenon of the verb-at-the-end about which droll tales of absentminded professors who would begin a sentence, ramble on for an entire…](https://sms4smile.com/quotes/douglas-hofstadter/the-proverbial-german-phenomenon-of-the-verb-at-the-end-about-which/)

[Douglas Hofstadter](https://sms4smile.com/quotes/author/douglas-hofstadter/)

> [“To understand what recursion is, you must first understand recursion.”](https://sms4smile.com/quotes/anonymous/to-understand-what-recursion-is-you-must-first-understand-recursion/)

[Anonymous](https://sms4smile.com/quotes/author/anonymous/)

> [We live in strange times. We also live in strange places: each in a universe of our own. The people with whom we populate…](https://sms4smile.com/quotes/douglas-adams/we-live-in-strange-times-we-also-live-in-strange-places-each-in-a-2/)

[Douglas Adams](https://sms4smile.com/quotes/author/douglas-adams/)

> [In another thirty years people will laugh at anyone who tries to invent a language without closures, just as they'll laugh now at anyone…](https://sms4smile.com/quotes/mark-jason-dominus/in-another-thirty-years-people-will-laugh-at-anyone-who-tries-to/)

[Mark Jason Dominus](https://sms4smile.com/quotes/author/mark-jason-dominus/)

> [I haven't seen any claim that Piraha lacks recursion, that is, that there are a finite number of sentences or sentence frames. If that's…](https://sms4smile.com/quotes/noam-chomsky/i-haven-t-seen-any-claim-that-piraha-lacks-recursion-that-is-that/)

[Noam Chomsky](https://sms4smile.com/quotes/author/noam-chomsky/)

[Browse all 12 Recursion quotes ](https://sms4smile.com/quotes/about/recursion/)

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Quotation",
            "text": "“You can do anything with stacks and iteration that you can do with recursion.”",
            "creator": {
                "@type": "Person",
                "name": "Steve McConnell"
            },
            "isPartOf": {
                "@id": "https://sms4smile.com/quotes/#website"
            },
            "url": "https://sms4smile.com/quotes/steve-mcconnell/you-can-do-anything-with-stacks-and-iteration-that-you-can-do-with/",
            "about": {
                "@type": "Thing",
                "name": "Recursion"
            },
            "@id": "https://sms4smile.com/quotes/steve-mcconnell/you-can-do-anything-with-stacks-and-iteration-that-you-can-do-with/#quotation",
            "image": {
                "@type": "ImageObject",
                "@id": "https://sms4smile.com/quotes/i/1d5/steve-mcconnell-11957_recursion_you-can-do-anything-with-stacks-and-iter_1594034.png",
                "contentUrl": "https://sms4smile.com/quotes/i/1d5/steve-mcconnell-11957_recursion_you-can-do-anything-with-stacks-and-iter_1594034.png",
                "url": "https://sms4smile.com/quotes/i/1d5/steve-mcconnell-11957_recursion_you-can-do-anything-with-stacks-and-iter_1594034.png",
                "width": 1080,
                "height": 1080,
                "caption": "“You can do anything with stacks and iteration that you can do with recursion.” — Steve McConnell",
                "creditText": "SMS4Smile Quotes",
                "creator": {
                    "@id": "https://sms4smile.com/quotes/#organization"
                }
            }
        },
        {
            "@type": "BreadcrumbList",
            "itemListElement": [
                {
                    "@type": "ListItem",
                    "position": 1,
                    "name": "Home",
                    "item": "https://sms4smile.com/"
                },
                {
                    "@type": "ListItem",
                    "position": 2,
                    "name": "Quotes",
                    "item": "https://sms4smile.com/quotes/"
                },
                {
                    "@type": "ListItem",
                    "position": 3,
                    "name": "Steve McConnell",
                    "item": "https://sms4smile.com/quotes/author/steve-mcconnell/"
                },
                {
                    "@type": "ListItem",
                    "position": 4,
                    "name": "“You can do anything with stacks...",
                    "item": "https://sms4smile.com/quotes/steve-mcconnell/you-can-do-anything-with-stacks-and-iteration-that-you-can-do-with/"
                }
            ],
            "@id": "https://sms4smile.com/quotes/steve-mcconnell/you-can-do-anything-with-stacks-and-iteration-that-you-can-do-with/#breadcrumb"
        },
        {
            "@type": "WebSite",
            "@id": "https://sms4smile.com/quotes/#website",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "publisher": {
                "@id": "https://sms4smile.com/quotes/#organization"
            }
        },
        {
            "@type": "Organization",
            "@id": "https://sms4smile.com/quotes/#organization",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "logo": {
                "@type": "ImageObject",
                "url": "https://sms4smile.com/quotes/wp-content/themes/sq/assets/icons/icon-512.png",
                "width": 512,
                "height": 512
            }
        }
    ]
}
```
