P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Indeed I found these links interesting especially in that they show that the concept is not perl-specific as I would have naively thought.
It seems to me that the basic aspect on which most references that were given to me concentrate is that of caching, which supports the actual "light" nature of these objects, as of the name attribution. However it doesn't seem to me that the typical example one sees about them is really any lighter than "standard" objects. Granted, I see how one could make them so, but that's a different story. Perhaps flyweight objects are really flyweight in other OO {models,languages}. Note: With the above I mean that the typical perl example of a constructor is: or (to speak about Inside-Out): Sometimes one sees \(my $bogus) instead of [], but basically in these typical constructors a unique id is associated to each object, different for all of them. Side note - OTWhile I think that WiKi's such as the referenced one are generally precious resources, I also find their extremely hypertextual nature occasionally confusing and annoying: I tend to have the impression that there may be some relevant node that I missed. Sometimes a slightly more sequential organization would come useful.Now one -well, I for one- wonders how an ordering could be find (maybe automatically or semiautomatically) in a document that is inherently hypertextual as to make it into a sequential thing... In reply to Re^2: Doubt about fly-weight objects.
by blazar
|
|