Boost logo

Boost :

From: Steven E. Harris (seh_at_[hidden])
Date: 2006-06-30 13:32:07


Joaquín Mª López Muñoz <joaquin_at_[hidden]> writes:

> Anyway, naming discussions aside, do you see value in such a thing
> being elaborated and eventually proposed to Boost?

>From my brief examination of the implementation and examples provided,
yes, it looks useful. I have no qualms with the idea and I have full
confidence you'll implement it well. However, I don't think you should
cast the naming problem aside as immaterial.

The links I provided described the interning facility in two other
languages. In discussing those other languages, we don't usually hear
about strings or symbols being "flyweights". We do hear "symbols are
interned" or "strings are interned". Expanding these statements could
yield something more like, "Strings are flyweight references to a
particular unique instance in a global pool."

We're both arguing that there's prior art here to justify the
name. Your implementation includes both a reference mechanism and a
pooling mechanism. "Flyweight" describes the former, but the pattern,
at least by my reading, doesn't speak to comparing candidate instances
and ensuring that there are no duplicates in the pool. That
duplicate-avoidance policy is specifically addressed by interning.

My concern is that I might overlook this library because its name does
not capture what I would value about it most. Clearly I have biases,
having been exposed to the "intern" terminology for years, so perhaps
we can hear from others as to whether the name is appropriate.

-- 
Steven E. Harris

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk