---
title: "I might be able to shoehorn a reference count in on top of the numeri… — Larry Wall Quote #298 | QuotesBy.net"
description: "I might be able to shoehorn a reference count in on top of the numeric value by disallowing multiple references on scalars with a numeric value, but … — a quote by Larry Wall."
image: "https://quotesby.net/wp-content/themes/quotesby-editorial/assets/og-default.png"
---

> # I might be able to shoehorn a reference count in on top of the numeric value by disallowing multiple references on scalars with a numeric value, but it wouldn't be as clean. I do occasionally worry about that.

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

[Programming](https://quotesby.net/Larry-Wall/programming/)[Design](https://quotesby.net/Larry-Wall/design/)[Complexity](https://quotesby.net/Larry-Wall/complexity/)[Memory](https://quotesby.net/Larry-Wall/memory/)

[WhatsApp (opens in a new tab)](https://wa.me/?text=%E2%80%9CI%20might%20be%20able%20to%20shoehorn%20a%20reference%20count%20in%20on%20top%20of%20the%20numeric%20value%20by%20disallowing%20multiple%20references%20on%20scalars%20with%20a%20numeric%20value%2C%20but%20it%20wouldn%27t%20be%20as%20clean.%20I%20do%20occasionally%20worry%20about%20that.%E2%80%9D%20%E2%80%94%20Larry%20Wall%20https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F298%2F)[X (opens in a new tab)](https://twitter.com/intent/tweet?text=%E2%80%9CI%20might%20be%20able%20to%20shoehorn%20a%20reference%20count%20in%20on%20top%20of%20the%20numeric%20value%20by%20disallowing%20multiple%20references%20on%20scalars%20with%20a%20numeric%20value%2C%20but%20it%20wouldn%27t%20be%20as%20clean.%20I%20do%20occasionally%20worry%20about%20that.%E2%80%9D%20%E2%80%94%20Larry%20Wall&url=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F298%2F)[Facebook (opens in a new tab)](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F298%2F)

## About this quote

What does it mean?The speaker muses about embedding a reference count in a scalar’s numeric value, noting it would be messy and a concern.In plain termsAdding reference counting to numbers would be messy and worrisome.What can you take from it?Complex low‑level tricks can introduce new problems.

### Where it applies

- language design
- runtime optimization

### Putting it to work

- prefer clean abstractions
- evaluate performance vs. maintainability

### Questions to consider

- When does a clever hack become a liability?
- What alternatives exist?

### Another view

The idea is speculative and may not be practical.

## More from Larry Wall

1. > I'll say it again for the logic impaired.

[Permalink to quote \#297](https://quotesby.net/Larry-Wall/297/ "Permalink to quote 297")
2. > Interestingly enough, since subroutine declarations can come anywhere, you wouldn't have to put BEGIN {} at the beginning, nor END {} at the end. Interesting, …

[Permalink to quote \#299](https://quotesby.net/Larry-Wall/299/ "Permalink to quote 299")
3. > I already have too much problem with people thinking the efficiency of a perl construct is related to its length. On the other hand, I'm perfectly capable of c…

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

## Related quotes

1. > There are probably better ways to do that, but it would make the parser more complex. I do, occasionally, struggle feebly against complexity... :-)

[Larry Wall](https://quotesby.net/Larry-Wall)[Larry Wall quote \#23](https://quotesby.net/Larry-Wall/23/ "Permalink to quote 23")
2. > A 'goto' in Perl falls into the category of hard things that should be possible, not easy things that should be easy.

[Larry Wall](https://quotesby.net/Larry-Wall)[Larry Wall quote \#112](https://quotesby.net/Larry-Wall/112/ "Permalink to quote 112")
3. > Make the suspension adjustable and they will adjust it wrong -- look what they can do to a Weber carburetor in just a few moments of stupidity with a screwdriv…

[Colin Chapman](https://quotesby.net/Colin-Chapman)[Colin Chapman quote \#3](https://quotesby.net/Colin-Chapman/3/ "Permalink to quote 3")

```json
{
    "@context": "https://schema.org",
    "@type": "Quotation",
    "text": "I might be able to shoehorn a reference count in on top of the numeric value by disallowing multiple references on scalars with a numeric value, but it wouldn't be as clean. I do occasionally worry about that.",
    "url": "https://quotesby.net/Larry-Wall/298/",
    "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 #298",
            "item": "https://quotesby.net/Larry-Wall/298/"
        }
    ]
}
```
