When I last looked at SmartReferenceStream, it did two things that were bad: (1) it essentially assumed all "users" are in fact programmers, have access to the debugger, and (more presumptuous) know what to to with same. There are times when yelling "it's broken" is about all the system should dare do. SRS made no such distinction. Again, the age of the code is showing. We have exception handling now, and should design with it in mind. (2) reshape code was placed in SRS itself, not in the class that is changing shape. The thing that is being deserialized (which is when problems become apparent) should be in charge of the change. It simplifies both packaging (fewer loose methods to consider, and reduced opportunity for name collisions) and it also helps with using proxies for special circumstances. ________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] on behalf of Mariano Martinez Peck [marianopeck@gmail.com] Sent: Sunday, December 11, 2011 10:54 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Cleaning up SmartRefStream use On Sun, Dec 11, 2011 at 4:35 PM, Stéphane Ducasse <stephane.ducasse@inria.fr<mailto:stephane.ducasse@inria.fr>> wrote: On Dec 11, 2011, at 4:26 PM, Mariano Martinez Peck wrote:
On Sun, Dec 11, 2011 at 11:32 AM, Stéphane Ducasse <stephane.ducasse@inria.fr<mailto:stephane.ducasse@inria.fr>> wrote: Indeed this is fun I was doing the same :) Now I do not understand why some parts of the system uses dataStream, others ReferenceStream and finally others SmartRefStream why not all of them use SmartRefStream.
It is not that I like these guys, but their class comments are pretty clear: - DataStream does NOT handle cycles, but hence it may be faster in certain scenarios. I guess that for example, Monticello is sure that in its definitions, there cannot be cycles. In addition, it doesn't take into account variables names/order and hence class reshape isn't supported. - ReferenceStream supports cycles but still doesn't support class reshape. - SmartRefStream supports cycles and class reshape.
sounds good Yes it does. In fact, I would love also to have those things optional/configurable in Fuel: optional cycle detection and optional class reshape support :) then we should be able to replace all the reference stream and smart by fuel. Yes, but Fuel is not completly ready to fully replace them. There are some hooks they provide that Fuel does not yet. But we will get there at some point. stef -- Mariano http://marianopeck.wordpress.com