“Memoization” is caching the results of expensive method calls for speed.
In Ruby, this is often implemented something like this:
Clearly this needs a name.
I’ve always thought of it as “rose memoization”, because of the
@ ||= pattern. It looks like an ASCII rose.
I was amazed not to find any (any!) Google results for that term, so now this post exists.
Are there any other terms in use for this construct?