---
title: "When in doubt, parenthesize. At the very least it will let some poor … — Larry Wall Quote #276 | QuotesBy.net"
description: "When in doubt, parenthesize. At the very least it will let some poor schmuck bounce on the % key in vi. — a quote by Larry Wall."
image: "https://quotesby.net/wp-content/themes/quotesby-editorial/assets/og-default.png"
---

> # When in doubt, parenthesize. At the very least it will let some poor schmuck bounce on the % key in vi.

[Larry Wall](https://quotesby.net/Larry-Wall)\#276

[Perl](https://quotesby.net/Larry-Wall/perl/)[Syntax](https://quotesby.net/Larry-Wall/syntax/)

[WhatsApp (opens in a new tab)](https://wa.me/?text=%E2%80%9CWhen%20in%20doubt%2C%20parenthesize.%20At%20the%20very%20least%20it%20will%20let%20some%20poor%20schmuck%20bounce%20on%20the%20%25%20key%20in%20vi.%E2%80%9D%20%E2%80%94%20Larry%20Wall%20https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F276%2F)[X (opens in a new tab)](https://twitter.com/intent/tweet?text=%E2%80%9CWhen%20in%20doubt%2C%20parenthesize.%20At%20the%20very%20least%20it%20will%20let%20some%20poor%20schmuck%20bounce%20on%20the%20%25%20key%20in%20vi.%E2%80%9D%20%E2%80%94%20Larry%20Wall&url=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F276%2F)[Facebook (opens in a new tab)](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F276%2F)

## About this quote

What does it mean?When unsure, add parentheses; it prevents errors and helps editors like vi.In plain termsParenthesize to avoid mistakes.What can you take from it?Use parentheses to clarify precedence.

### Where it applies

- writing complex expressions
- debugging

### Putting it to work

- add parentheses early
- test in vi

### Questions to consider

- When does extra parentheses hurt more than help?

### Another view

Over‑parenthesizing can clutter code.

## More from Larry Wall

1. > \*\*\* The previous line contains the naughty word '$&amp;'. if /(ibm\|apple\|awk)/; # :-)

[Permalink to quote \#275](https://quotesby.net/Larry-Wall/275/ "Permalink to quote 275")
2. > But I'm not here to talk about postmodernism. I tried to do that last spring, and afterwards I was thoroughly deconstructed by the deconstructionists for attem…

[Permalink to quote \#277](https://quotesby.net/Larry-Wall/277/ "Permalink to quote 277")
3. > The autodecrement is not magical.

[Permalink to quote \#274](https://quotesby.net/Larry-Wall/274/ "Permalink to quote 274")

## Related quotes

1. > And don't tell me there isn't one bit of difference between null and space, because that's exactly how much difference there is. :-)

[Larry Wall](https://quotesby.net/Larry-Wall)[Larry Wall quote \#2](https://quotesby.net/Larry-Wall/2/ "Permalink to quote 2")
2. > &gt; (It's sorta like sed, but not. It's sorta like awk, but not. etc.) Guilty as charged. Perl is happily ugly, and happily derivative.

[Larry Wall](https://quotesby.net/Larry-Wall)[Larry Wall quote \#51](https://quotesby.net/Larry-Wall/51/ "Permalink to quote 51")
3. > We toast the Lisp programmer who pens his thoughts within nests of parentheses.

[Alan Perlis](https://quotesby.net/Alan-Perlis)[Alan Perlis quote \#2](https://quotesby.net/Alan-Perlis/2/ "Permalink to quote 2")

```json
{
    "@context": "https://schema.org",
    "@type": "Quotation",
    "text": "When in doubt, parenthesize. At the very least it will let some poor schmuck bounce on the % key in vi.",
    "url": "https://quotesby.net/Larry-Wall/276/",
    "spokenByCharacter": {
        "@type": "Person",
        "name": "Larry Wall"
    }
}
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "name": "Home",
            "item": "https://quotesby.net/"
        },
        {
            "@type": "ListItem",
            "position": 2,
            "name": "Authors",
            "item": "https://quotesby.net/authors/"
        },
        {
            "@type": "ListItem",
            "position": 3,
            "name": "Larry Wall",
            "item": "https://quotesby.net/Larry-Wall"
        },
        {
            "@type": "ListItem",
            "position": 4,
            "name": "Quote #276",
            "item": "https://quotesby.net/Larry-Wall/276/"
        }
    ]
}
```
