[Pharo-project] About readStream on: vs readStream
Hi damien I was wondering why you think that ReadStream on: anObject is worse than anObject readStream? Because you do not hardcode ReadStream? Stef
On Wed, Jun 4, 2008 at 8:36 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
I was wondering why you think that ReadStream on: anObject is worse than anObject readStream? Because you do not hardcode ReadStream?
I already gave my opinion that at least 3 times :-). Here is it again: - no more direct reference on ReadStream where it is not necessary - allows different implementation of #readStream depending on the receiver class (different collection classes can use specific streams as it is the case in Nile. In GnuSmalltalk, WriteStream>>readStream answers a ReadStream without needing copy the collection) - clarify the code: I noticed the code becomes much more readable - use a method that has been there for ages -- Damien Cassou Peter von der Ahé: «I'm beginning to see why Gilad wished us good luck». (http://blogs.sun.com/ahe/entry/override_snafu)
ok i like this summary stef On Jun 5, 2008, at 11:37 AM, Damien Cassou wrote:
On Wed, Jun 4, 2008 at 8:36 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
I was wondering why you think that ReadStream on: anObject is worse than anObject readStream? Because you do not hardcode ReadStream?
I already gave my opinion that at least 3 times :-). Here is it again:
- no more direct reference on ReadStream where it is not necessary - allows different implementation of #readStream depending on the receiver class (different collection classes can use specific streams as it is the case in Nile. In GnuSmalltalk, WriteStream>>readStream answers a ReadStream without needing copy the collection) - clarify the code: I noticed the code becomes much more readable - use a method that has been there for ages
-- Damien Cassou Peter von der Ahé: «I'm beginning to see why Gilad wished us good luck». (http://blogs.sun.com/ahe/entry/override_snafu)
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (2)
-
Damien Cassou -
Stéphane Ducasse