Shouldn't collection zip functions return streams?

Ian Nowland <[email protected]> Wed, 25 Nov 2015 11:46:18 -0500
Newsgroups gmane.comp.lang.scala
Message-ID <CAGCWg7H0QZHiWMw=6=XXWTrokdgTNLX=9+c2VUX+fxqywnEkJg@mail.gmail.com>
Just a thought: when users use the various collection zip functions, what
they're really saying is that they want to perform the next function
against their collection with the elements compared against some other
value, such as the elements of a parallel collection, or the index.

From that perspective, it seems like the zip functions should be returning
Streams rather than maintain the base collection type. This would make more
sense computationally whenever that next operation they want to perform is
something like a find or an exists, but I also think that it makes more
sense logically as well - by converting to a Stream, the zip isn't actually
being performed at the moment, instead it's more like a just in time
operation on the elements of the collection from that point on.

--Ian

-- 
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.