in reply to The need to rebless (was: Informal Poll: Traits)
in thread Informal Poll: why aren't you using traits?
Can you (or anyone) think of any case where reblessing is useful, in the sense that solving the same problem another way would be awkward?
I've seen it used with a class hierarchy that was based around incrementally parsing a serialised data structure. As the data was parsed it as reblessed to more and more specific classes as more was known about the structure in question. Quite neat.
I've also occasionally used reblessing to implement state transitions.
|
|---|