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.
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 terms
- Adding 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
Putting it to work
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
I'll say it again for the logic impaired.
Permalink to quote #297 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 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
Related quotes
There are probably better ways to do that, but it would make the parser more complex. I do, occasionally, struggle feebly against complexity... :-)
Larry WallLarry Wall quote #23 A 'goto' in Perl falls into the category of hard things that should be possible, not easy things that should be easy.
Larry WallLarry Wall quote #112 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 ChapmanColin Chapman quote #3