Flyweight Pattern - small correction to description

Congrats on a a really well presented site.  Just offering what I think is a minor correction:

This sentence from the Flyweight pattern description is confusing:
"The flyweight maintains intrinsic state (state that is shared among the
large number of objects that we have created the flyweight for) and
provides methods to manipulate external state (State that vary from
object to object and is not common among the objects we have created the
flyweight for)."

Should the first parenthetic statement instead read: "
intrinsic state (state that is not shared among the
large number of objects
..." ?


  • In my opionion the authors view of the flyweight is <em>correct</em> and whilst I see your point jdedrick, the wording above is fine. You can use the flyweight to store either the variant or the common state. Generally though the flywieght stores the common (shared) state. Either ways the problem being solved is the same. If the changing values (state) are stored then you will first need a Proto-type or base object, upon which the "fly-weight" shall act to create each modified operation. However in the author's case the flyweight's internal state is the common state, and external (arguements) state may passed to modify behaviour of the intrinsic state or to extend it.