|
Boost : |
From: Steven E. Harris (seh_at_[hidden])
Date: 2006-06-29 12:09:01
Joaquín Mª López Muñoz <joaquin_at_[hidden]> writes:
> The main difference is that flyweight<T> enforces that *every*
> flyweight object with the same value will have a pointer to the same
> internal representation.
Isn't this usually called "intern", at least when applied to strings?¹
I can see how "flyweight" captures the means of referring to the
interned object, but the essential facility here is the interning, not
the reference mechanism.
Footnotes:
¹ http://www.lispworks.com/documentation/HyperSpec/Body/f_intern.htm
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#intern()
-- 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